Bug 490015 - TZ not calculated properly in JDK for location Americas/Raleigh(DST not recognized)
Summary: TZ not calculated properly in JDK for location Americas/Raleigh(DST not recog...
Status: CLOSED DUPLICATE of bug 489586
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk
Version: rawhide
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Lillian Angel
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-03-12 20:50 UTC by Jay Howell
Modified: 2009-05-15 18:43 UTC (History)
6 users (show)

Clone Of:
Last Closed: 2009-05-15 18:43:40 UTC

Attachments (Terms of Use)

Description Jay Howell 2009-03-12 20:50:09 UTC
Description of problem:

When using java.util.Date functions, the TZ is not automatically calculated for Raleigh locations.  

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  Configure Rawhide to use Raleigh as a location for time zone.
2.  Write a java app that does System.out.println( new java.util.Date());
4.  Went in and looked at the Timezone object and did 

Actual results:
It will return GMT-5 during Daylight Savings time 

Expected results:
it should return GMT-4

Additional info:
TimeZone.getTimeZone("America/Raleigh").getDSTSavings(), it returns 0.

The work around is to use a different major city in the same time zone.  When I change my Platform location to be New York it works ok.  I can also fix this by adding System.setProperty("user.timezone", "America/New_York"); in the beginning of my code.  

So it seems like a mismatch of TZ between the platform and the JVM.

Comment 1 Omair Majid 2009-03-19 15:25:35 UTC
Hi Jay,

I upgraded to rawhide from f10, and I cant find a way to use Raleigh as the local timezone. So i cant reproduce the issue :(. I cant find an entry for Raleigh in system-config-date, nor an file in /usr/share/zoneinfo.

Printing TimeZone.getTimeZone("America/Raleigh") in Java produces:

The timezone information is provided the tzdata package for the system and by tzdata-java package for java. They are built form the same set of sources, so there shouldnt be a mismatch.

Comment 2 Ioana Ivan 2009-03-25 04:37:14 UTC
I think America/New_York is the correct time zone for Raleigh. The problem is that java looks for time zone information in /etc/sysconfig/clock, where the ZONE parameter is specified as America/New York instead of America/New_York (see https://bugzilla.redhat.com/show_bug.cgi?id=489586)

Comment 3 Ioana Ivan 2009-05-15 18:43:40 UTC

*** This bug has been marked as a duplicate of bug 489586 ***

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