RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1236619 - java-1.6.0-openjdk reads and interprets /etc/sysconfig/clock
Summary: java-1.6.0-openjdk reads and interprets /etc/sysconfig/clock
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: java-1.6.0-openjdk
Version: 6.6
Hardware: All
OS: All
low
low
Target Milestone: rc
: ---
Assignee: Andrew John Hughes
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-29 14:47 UTC by Paulo Andrade
Modified: 2020-09-10 09:24 UTC (History)
7 users (show)

Fixed In Version: java-1.6.0-openjdk-1.6.0.36-1.13.8.0.el6_7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 20:30:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Icedtea Bugzilla 2481 0 None None None Never
Red Hat Product Errata RHBA-2016:0788 0 normal SHIPPED_LIVE java-1.6.0-openjdk bug fix update 2016-05-10 22:36:41 UTC

Description Paulo Andrade 2015-06-29 14:47:05 UTC
I was unsure if the problem was in system-config-date,
that does a "s/_/ /" in the string before writing to
/etc/sysconfig/clock, and appears to also do a "s/ /_/"
when reading it, in certain versions.

But I found a similar problem for Fedora from some
years ago, and that should have been corrected in
openjdk and sun java.

See https://bugzilla.redhat.com/show_bug.cgi?id=489586

Comment 2 Andrew John Hughes 2015-06-29 16:30:37 UTC
This has regressed because of bug #995488; see https://bugzilla.redhat.com/show_bug.cgi?id=995488#c21

On RHEL 6:

$ cat /etc/sysconfig/clock
# The time zone of the system is defined by the contents of /etc/localtime.
# This file is only for evaluation by system-config-date, do not rely on its
# contents elsewhere.
ZONE="Asia/Hong Kong"

$ /usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin/java TestRH489586
Default TZ=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
Now=Mon Jun 29 16:20:58 GMT 2015

$ /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java TestRH489586
Default TZ=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
Now=Mon Jun 29 16:21:01 GMT 2015

Correcting the space:

$ cat /etc/sysconfig/clock
# The time zone of the system is defined by the contents of /etc/localtime.
# This file is only for evaluation by system-config-date, do not rely on its
# contents elsewhere.
ZONE="Asia/Hong_Kong"

$ /usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin/java TestRH489586
Default TZ=sun.util.calendar.ZoneInfo[id="Asia/Hong_Kong",offset=28800000,dstSavings=0,useDaylight=false,transitions=71,lastRule=null]
Now=Tue Jun 30 00:22:02 HKT 2015

$ /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java TestRH489586
Default TZ=sun.util.calendar.ZoneInfo[id="Asia/Hong_Kong",offset=28800000,dstSavings=0,useDaylight=false,transitions=71,lastRule=null]
Now=Tue Jun 30 00:22:05 HKT 2015

OpenJDK 8 ignores the file, providing my local timezone (GB-Eire) in both cases.
So, presumably it suffers from bug #995488.

We could make the code in 6 & 7 replace the spaces with '_'. But I still think the correct fix is to provide /etc/timezone.

Comment 3 Andrew John Hughes 2015-06-29 16:53:41 UTC
I've filed bug 1236667 to try and get /etc/timezone supported, but we can try and support the space-variant in the meantime.

Comment 9 errata-xmlrpc 2016-05-10 20:30:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0788.html


Note You need to log in before you can comment on or make changes to this bug.