<i18n dev> Open Jdk Timezone bug?

Bill Tims (RSI) btims at rsitex.com
Wed Dec 2 10:39:58 PST 2009


Andrew/Masayoshi

   After some research it appears that we have the openjdk-6-jre-lib package, version b11, installed and it is current according to Ubuntu. The latest openjdk-6-jre has the same version number. Masayoshi indicates in an earlier email that the current version is 6u17.  

When I run the app I wrote (I've added a dump of the version info from system properties) that displays the offset for America/Chicago for 1900 I get:
version=1.6.0_0
vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.version=1.6.0_0-b11
java.vm.vendor=Sun Microsystems Inc.
timezone.id=America/Chicago
date=Mon Jan 01 00:00:00 CDT 1900
1900/0:-18000000
1900/1:-18000000
1900/2:-18000000
1900/3:-18000000
1900/4:-18000000
1900/5:-18000000
1900/6:-18000000
1900/7:-18000000
1900/8:-18000000
1900/9:-18000000
1900/10:-21600000
1900/11:-21600000

The display is year/month#:offset.  
The same program running under the Sun jdk on windows gives me:
version=1.6.0_07
vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.version=10.0-b23
java.vm.vendor=Sun Microsystems Inc.
timezone.id=America/Chicago
date=Mon Jan 01 00:00:00 CST 1900
1900/0:-21600000
1900/1:-21600000
1900/2:-21600000
1900/3:-21600000
1900/4:-21600000
1900/5:-21600000
1900/6:-21600000
1900/7:-21600000
1900/8:-21600000
1900/9:-21600000
1900/10:-21600000
1900/11:-21600000

Bill

Bill Tims
Renaissance Systems, Inc.
5426 Guadalupe, Suite 100
Austin, TX  78751
512-275-0344
 

-----Original Message-----
From: gnu.andrew.rocks at gmail.com [mailto:gnu.andrew.rocks at gmail.com] On Behalf Of Andrew John Hughes
Sent: Wednesday, December 02, 2009 8:54 AM
To: Masayoshi Okutsu
Cc: Bill Tims (RSI); i18n-dev at openjdk.java.net
Subject: Re: <i18n dev> Open Jdk Timezone bug?

2009/12/1 Masayoshi Okutsu <Masayoshi.Okutsu at sun.com>:
> What is the time zone ID you are using?
>
> Thanks,
> Masayoshi
>
> On 12/1/2009 1:55 AM, Bill Tims (RSI) wrote:
>>
>> From what I can find, this appears to be the right place to post 
>> this, if I'm wrong I would appreciate a pointer to the proper location.
>>  The database our app has to talk to has January 1,1900 12:00:00 am 
>> date in it.  When I load the value into a open jdk date object (using 
>> Ubuntu/JBoss 4.2.3 GA-jdk6) I get December 31, 1899 23:00:00.  When I 
>> do the same thing on my dev box (Win XP/Sun jre 1.6.0_07) I get 
>> January 1, 1900 12:00:00 am.  I wrote a test program that prints out 
>> the Timezone info for 1898-1902 and it appears that the open jdk has 
>> a daylight savings time starting on Jan 1, 1900 through Oct 1, 1900 
>> and the sun version doesn't.  According to Wikipedia, Daylight 
>> savings wasn't suggested until 1907.
>>  I can't find anything on the web that suggests where the timezone 
>> info is kept or how complicated it will be to rebuild whatever jar 
>> file is required. Can someone point me to the proper source file and 
>> suggest how involved building the fix will be?
>>  Thanks
>>    Bill
>>  !
>>
>> Bill Tims
>>
>> Renaissance Systems, Inc.
>>
>>
>>
>

You don't give any details of the OpenJDK version - what does 'java -version' give on your Ubuntu box?
If this is the system OpenJDK build, then it's an IcedTea build and thus includes a patch to use the system timezone data which is likely to be more up-to-date than that bundled with Sun's JDK.
--
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8


More information about the i18n-dev mailing list