Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Daylight saving issue.

 
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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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/
 
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!