• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Daylight saving issue.

 
Abhilash Boinapally
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In our project there is one shift time from 18 to 2 am as this is a dst transition time we are facing a peculiar problem.On reaching 1.59 am on march 11 the time should become 3 am (as 2 am is virtually not there) but in my application it showing 1 am ie 2 am is becoming 1 am.our tool is using jdk 1.3.1 version.

when i checked sun portal

Why does the 1.3.1 JDK version not transition into or out of DST settings at the correct hour?
There is a known limitation with the 1.3.1 JDK in relation to it calculating the correct time for entering and exiting DST transitions. This behavior has been present since 1.3.1 FCS. It has been corrected in 1.4 and in later JDK versions when the time zone framework was re-coded. The limitation arises from complexities in determining whether a given timestamp is in standard or daylight time savings rules. As a result, transition times can be out of range by one hour on the night of a transition.
For example, given a system with the time zone "America/New_York", you would see the following behavior:
Entering DST:

$/jdk/j2sdk1_3_1/bin/java DSTTest "3/11/2007 2:00 AM"
Sun Mar 11 01:00:00 EST 2007 *Currently not in daylight-savings time.
$/jdk/j2sdk1_3_1/bin/java DSTTest "3/11/2007 3:00 AM"
Sun Mar 11 03:00:00 EDT 2007 *Currently in daylight-savings time.Exiting DST:

$/jdk/j2sdk1_3_1/bin/java DSTTest "11/04/2007 12:59 AM"
Sun Nov 04 00:59:00 EDT 2007 *Currently in daylight-savings time.
$/jdk/j2sdk1_3_1/bin/java DSTTest "11/04/2007 01:00 AM"
Sun Nov 04 01:00:00 EST 2007 *Currently not in daylight-savings time.

so its a bug.How to solve this issue.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure this would help, but can you check the following page :
http://java.sun.com/developer/technicalArticles/Intl/USDST/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic