openjdk team mailing list archive
-
openjdk team
-
Mailing list archive
-
Message #00359
[Bug 243305] [NEW] openjdk does not detect system timezone
Public bug reported:
I have set my system time to EDT (as reported by the "date" command),
but Java reports my timezone as GMT (as reported by "user.timezone"
property).
To reproduce:
create a file named tzTest.java with these contents:
import java.util.Date;
public class tzTest{
public static void main(String[] args){
Date now = new Date();
System.out.printf("RFC 822 numeric time zone indicator: %tz/%Tz\n", now, now);
}
}
now run it:
java tzTest
Here's the result I see with openjdk 1.6.0-b10:
$ java tzTest
RFC 822 numeric time zone indicator: +0000/+0000
Here's the result with gjc:
$ /usr/lib/jvm/java-1.5.0-gcj-4.2-1.5.0.0/bin/java tzTest
RFC 822 numeric time zone indicator: -0300/-0300
** Affects: openjdk-6 (Ubuntu)
Importance: Undecided
Status: New
--
openjdk does not detect system timezone
https://bugs.launchpad.net/bugs/243305
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in ubuntu.
Status in Source Package "openjdk-6" in Ubuntu: New
Bug description:
I have set my system time to EDT (as reported by the "date" command), but Java reports my timezone as GMT (as reported by "user.timezone" property).
To reproduce:
create a file named tzTest.java with these contents:
import java.util.Date;
public class tzTest{
public static void main(String[] args){
Date now = new Date();
System.out.printf("RFC 822 numeric time zone indicator: %tz/%Tz\n", now, now);
}
}
now run it:
java tzTest
Here's the result I see with openjdk 1.6.0-b10:
$ java tzTest
RFC 822 numeric time zone indicator: +0000/+0000
Here's the result with gjc:
$ /usr/lib/jvm/java-1.5.0-gcj-4.2-1.5.0.0/bin/java tzTest
RFC 822 numeric time zone indicator: -0300/-0300
Follow ups
-
[Bug 243305] Re: openjdk does not detect system timezone
From: Craig, 2009-02-24
-
[Bug 243305] Re: openjdk does not detect system timezone
From: Dimitrios Symeonidis, 2009-02-24
-
[Bug 243305] Re: openjdk does not detect system timezone
From: Craig, 2008-09-16
-
[Bug 243305] Re: openjdk does not detect system timezone
From: Timothy J. Wisniewski, 2008-08-08
-
[Bug 243305] Re: openjdk does not detect system timezone
From: Matthias Klose, 2008-08-05
-
[Bug 243305] Re: openjdk does not detect system timezone
From: Craig, 2008-07-03
-
[Bug 243305] Re: openjdk does not detect system timezone
From: Craig, 2008-06-30
-
[Bug 243305] Re: openjdk does not detect system timezone
From: Matthias Klose, 2008-06-30
-
[Bug 243305] Re: openjdk does not detect system timezone
From: Matthias Klose, 2008-06-30
-
[Bug 243305] [NEW] openjdk does not detect system timezone
From: Craig, 2008-06-26
References