[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/28550] New: TimeZone.getDefault() probably incorrect and
From: |
andrew at operationaldynamics dot com |
Subject: |
[Bug classpath/28550] New: TimeZone.getDefault() probably incorrect and not equals(`/etc/localtime`) |
Date: |
31 Jul 2006 08:44:40 -0000 |
The default ("local") timezone returned by TimeZone.getDefault() should match
the name of the zone pointed at by the /etc/localtime symlink [or named in the
first line of the an /etc/timezone file, which is a long since deprecated
usage]
On our office systems, /etc/localtime -> /usr/share/zoneinfo/Australia/Sydney
(and just for kicks, /etc/timezone = "Australia/Sydney")
$ java TimeZoneBugs
Local zone: Australia/Sydney
(correct)
For zone named: America/Montreal
TimeZone.getID() should be the same: America/Montreal
For zone named: Australia/Sydney
TimeZone.getID() should be the same: Australia/Sydney
For zone named: Europe/Paris
TimeZone.getID() should be the same: Europe/Paris
You can observe that the TimeZone returned with
.getTimeZone("Australia/Sydney") matches .getDefault() ... and even more
importantly, they match with .equals()
But with classpath, things are confused. JamVM 1.4.3 + classpath 0.91:
$ jamvm TimeZoneBugs
Local zone: AET
(wrong!)
For zone named: America/Montreal
TimeZone.getID() should be the same: America/Montreal
For zone named: Australia/Sydney
TimeZone.getID() should be the same: Australia/Sydney
For zone named: Europe/Paris
TimeZone.getID() should be the same: Europe/Paris
With GCJ 4.1.1 the same problem arises:
$ ./TimeZoneBugs
Local zone: AET
(wrong!)
etc
AfC
--
Summary: TimeZone.getDefault() probably incorrect and not
equals(`/etc/localtime`)
Product: classpath
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andrew at operationaldynamics dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28550
- [Bug classpath/28550] New: TimeZone.getDefault() probably incorrect and not equals(`/etc/localtime`),
andrew at operationaldynamics dot com <=