Friday April 22, 2005 | ${log.root}/lowem.log Inflation, Investing and Everything |
|
Just came across this article "Energy Bill at a Glance". I would have put this under the Energy category ("open Arctic National Wildlife Refuge in Alaska to oil drilling", "$8.1 billion in tax breaks ... for oil, gas, nuclear, coal and electric utilities", yada). Till I came across this one - "expand daylight-saving time by two months, so it would start on the first Sunday in March and end on the last Sunday in November." Yikes! What would that mean for our computer systems, and to the Java JDK's we've been using? Is a JDK update required to support this? freerepublic.com has a post on this (excerpt) : The last time the United States changed its timezone rules was back in 1987. But the way computer programs typically deal with dates and times is substantially different from 1987. Should Congress actually change the rules, the impact would be much greater today than it was in 1987. Back in 1987, most systems and applications stored timestamps relative to local time, not relative to GMT. The reverse is true today, and the consequences are non-trivial. Java embeds the timezone offset rules in the JDK codebase ("rt.jar.") Consequently, Sun would have to publish a new version of the rt.jar file--which they would probably do only for the latest version of Java. Java only deals with the current offset rules. It cannot apply different rules for timestamps in different timeperiods (e.g., pre-1967, 1967-1973, 1974, 1975, 1976-1986, 1987-2005, 2006-??) Worse, Java always represents timestamps as a number of milliseconds since 1 January 1970 GMT, and converts to local time only when the timestamp is displayed. Consequently, any future dates represented as Java Date or Calendar instances reflect the GMT time for that LOCAL date (or moment in time) based on the timezone rules that were encoded into the rt.jar file when the Date or Calendar instance was created, not based on any FUTURE timezone rules. This means that any timestamps in the past for March or November would have their local time shifted forward by one hour. The same applies to any dates already created for any future March or November. "12:01 am" would become "1:01 am." See also : 1. Daylight Savings Change Proposed (slashdot.org) (2005-04-22 17:13:08 SGT)
[Java]
Permalink
Comments:
Post a Comment: Comments are closed for this entry. Most popular blog postings on lowem.log : 1. Singapore MRT rail network length to double by 2020 Featured articles on lowem.log : 1. Book review : Shut Down by William Flynn |
|
||||||||||||||||||||||||||||||