${log.root}/lowem.log
Inflation, Investing and Everything


All | Musings | Tech | Java | Biz | Energy | Env

AddThis Feed Button
20050422 Friday April 22, 2005

Energy Bill : JDK update required?

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

Earth Day 2005

According to Google, today, 22 April 2005, is Earth Day. Here are a couple of sites about it.

As for the state of the Earth? Leading scientists are raising the alarm on the consumption of planetary resources and also on climate change.

And here's a message from Earth Day founder, Senator Nelson regarding the history of this day.

(2005-04-22 15:23:38 SGT) [Env] Permalink





Most popular blog postings on lowem.log :

1. 2010 Nissan Leaf electric car specifications : 107hp, 24KWh lithium-ion batteries, 100-mile range
2. 2010 Honda CR-Z hybrid, 2010 Honda Fit/Jazz hybrid models confirmed
3. 2010 Honda Civic Hybrid preliminary specifications released
4. Singapore SIBOR rate falls to 0.69% in Jan 2009, lowest since Apr 2004
5. How to insert currency exchange rates into Google Spreadsheets
6. Singapore : Nuclear power not ruled out
7. Live spot gold price quotes chart on COMEX
8. 2010 Toyota Prius specifications released : 50 mpg, 1.8L, 134hp, Ni-MH, solar roof option

Featured articles on lowem.log :

1. 2010 Honda Civic Hybrid preliminary specifications released
2. 2010 Honda CR-Z hybrid, 2010 Honda Fit/Jazz hybrid models confirmed
3. 2010 Toyota Prius specifications released : 50 mpg, 1.8L, 134hp, Ni-MH, solar roof option
4. Honda, GS Yuasa JV to make lithium-ion batteries for 2010/2011 Honda Civic Hybrid
5. New efficient nanotech materials may boost enhanced geothermal power systems
6. NYMEX crude oil recovers from $32.40 low after 2.2 mbpd OPEC production cut announced
7. Singapore property market recovery seen as private home sales surge 52% in Jul 2009
8. Singapore SIBOR rate falls to 0.69% in Jan 2009, lowest since Apr 2004





search
sponsored links





bookmarks

about
my profile
contact me

blogroll
biow/ken/wenn
reviewem
sgenergycrisis

sites
photo gallery
wiki

quotes
live oil prices
live gold prices

charts
live forex rates
live oil chart
live gold chart
live silver chart

historical
crude oil chart
gold chart
silver chart


navigation
decals

Featured blogger at The Energy Collective
Click for Singapore, Singapore Forecast





rss feed for lowem.log

Get Firefox!

powered by
hosted by