New daylite savings rules for 2007

In 2007, the time period for daylight savings time is being expanded. Does anyone know if these rules are enforced in sun's java classes, or retrieved from the underlying operating system?The question is will daylight savings time be incorrect in 2007 for java programs?
[285 byte] By [dmbdmba] at [2007-10-2 20:08:15]
# 1

> In 2007, the time period for daylight savings time is

> being expanded. Does anyone know if these rules are

> enforced in sun's java classes, or retrieved from the

> underlying operating system?

>

The rules are enforced if the designers are aware of them. Recently in Australia the DST was changed due to a special occasion and Sun released a patch:

http://java.sun.com/developer/technicalArticles/Intl/AusTimeZone/

> The question is will daylight savings time be

> incorrect in 2007 for java programs?

Not likely.

Mr_Meea at 2007-7-13 22:48:40 > top of Java-index,Java Essentials,Java Programming...
# 2

I agree, you will have to recompile your programs using a patched JDK. I like the idea, but in practice, it will be much harder to implement. If they just got rid of daylight saving time, it would be much easier on programmers and hardware. There are usually checkboxes to unclick if there is no DST.

Caps18a at 2007-7-13 22:48:40 > top of Java-index,Java Essentials,Java Programming...
# 3
This is a JVM change, not a change to your code.See [url= http://forum.java.sun.com/thread.jspa?threadID=735038&messageID=4225573]my previous answer to this question[/url].
stdunbara at 2007-7-13 22:48:40 > top of Java-index,Java Essentials,Java Programming...
# 4
VM change? Not a change to the API? I thought all that info was kept in instances of the TimeZone class.
jverda at 2007-7-13 22:48:40 > top of Java-index,Java Essentials,Java Programming...
# 5

Did I misunderstand something? You ask a TimeZone when the start and end of something like daylight savings time is. This data is stored within code I don't have access to - sun.util.calendar.ZoneInfo and sun.util.calendar.ZoneInfoFile (according to the source code for java.util.TimeZone). So once you have a new JVM the code you have to ask the start and end days will get the correct answer.

stdunbara at 2007-7-13 22:48:40 > top of Java-index,Java Essentials,Java Programming...
# 6
rats, i would have thought sun's ZoneInfo class would have gathered up available timezones (and there dlst times/offsets) from the operating system, rather than having some canned static list in some java class.
dmbdmba at 2007-7-13 22:48:40 > top of Java-index,Java Essentials,Java Programming...
# 7
Ah! found this: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6317178
dmbdmba at 2007-7-13 22:48:40 > top of Java-index,Java Essentials,Java Programming...
# 8
Also look at the \zi\ directory and tzmappings file in the jre\lib directory.Some of the information is derived from os sources, and of course varies by os.
ChuckBinga at 2007-7-13 22:48:40 > top of Java-index,Java Essentials,Java Programming...