File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Daylight saving issue. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Daylight saving issue." Watch "Daylight saving issue." New topic
Author

Daylight saving issue.

Abhilash Boinapally
Greenhorn

Joined: Jun 13, 2006
Posts: 8
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

I'm not sure this would help, but can you check the following page :
http://java.sun.com/developer/technicalArticles/Intl/USDST/


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Daylight saving issue.