-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
unknown, 1.1.3
-
x86, sparc
-
solaris_2.5.1, windows_nt
Name: diC59631 Date: 08/27/97
In file java/util/TimeZone.java:
1. TimeZone information for 'European Central Time' contains
wrong information: Since 1996, daylight saving time ends on
the last sunday in october, but java/util/TimeZone.java
contains `sunday of last week in september'
[second unrelated problem]
2. A solaris system located in 'central europe' typically uses the
timezone id 'TZ=MET' which is interpreted by java as 'Middle
East Time', which leads to unexpected local time values due
to the wrong localtime vs. gmttime offset (3.5 hours vs. 1 hour)
Source code to reproduce the problem:
import java.util.*;
public class Cal2 {
public static void main(String[] args) {
GregorianCalendar c;
c = new GregorianCalendar(1997, 7, 30, 12, 00, 30);
System.out.println(c.getTime());
c = new GregorianCalendar(1997, 8, 30, 12, 00, 30);
System.out.println(c.getTime());
c = new GregorianCalendar(1997, 9, 30, 12, 00, 30);
System.out.println(c.getTime());
}
}
2% javac Cal2.java
3% java -Duser.timezone=ECT Cal2
Sat Aug 30 12:00:30 GMT+02:00 1997
Tue Sep 30 12:00:30 GMT+01:00 1997
Thu Oct 30 12:00:30 GMT+01:00 1997
Note the wrong timezone offset for the second line which should
read GMT+02:00 since daylight saving time is still effective on
Sep, 30th in central europe!
company - Tools GmbH , email - ###@###.###
======================================================================
- duplicates
-
JDK-4074840 ECT timezone contains wrong daylight saving time information
-
- Closed
-
-
JDK-4059431 Problem with the SystemTime on a Solaris Machine (Timezone = "WET")
-
- Closed
-