JDK-4644278 : (tz) java.util.TimeZone assumes BST at Epoch of "Europe/London"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.4.0,1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_nt,windows_xp
  • CPU: x86
  • Submitted: 2002-02-27
  • Updated: 2007-10-19
  • Resolved: 2002-02-28
Related Reports
Duplicate :  
Relates :  
Description

Name: jk109818			Date: 02/27/2002


FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

FULL OPERATING SYSTEM VERSION :
Windows NT Version 4.0 - SP6

A DESCRIPTION OF THE PROBLEM :
The "Europe/London" TimeZone assumes that 1970-1-1 00:00:00
GMT is in Brittish Summer Time (GMT+1). Looking into it
further it seems that BST is used for all dates between the
start of daylight saving in 1968 to the end of daylight
saving 1971. All other dates seem fine.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. TimeZone zone = TimeZone.getTimeZone("Europe/London");
2. System.out.println(zone.getOffset(0L));

EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected result : 0
Actual result : 3600000 (1hour)

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.util.*;

public class DateTest {
   
    public static void main(final String[] args) throws Exception {
        final TimeZone zone = TimeZone.getTimeZone("Europe/London");
        System.out.println(zone.getOffset(0L));
    }
}
---------- END SOURCE ----------
(Review ID: 143269) 
======================================================================

Comments
EVALUATION According to the public time zone information from ftp://elsie.nci.nih.gov/pub/, the Europe/London time zone is defined as follows: # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/London -0:01:15 - LMT 1847 Dec 1 0:00 GB-Eire %s 1968 Oct 27 1:00 - BST 1971 Oct 31 2:00u 0:00 GB-Eire %s 1996 0:00 EU GMT/BST # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S ... # Summer Time Order, 1961 (S.I. 1961/71) # Summer Time (1962) Order, 1961 (S.I. 1961/2465) # Summer Time Order, 1963 (S.I. 1963/81) Rule GB-Eire 1961 1963 - Mar lastSun 2:00s 1:00 BST Rule GB-Eire 1961 1968 - Oct Sun>=23 2:00s 0 GMT # Summer Time (1964) Order, 1963 (S.I. 1963/2101) # Summer Time Order, 1964 (S.I. 1964/1201) # Summer Time Order, 1967 (S.I. 1967/1148) Rule GB-Eire 1964 1967 - Mar Sun>=19 2:00s 1:00 BST # Summer Time Order, 1968 (S.I. 1968/117) Rule GB-Eire 1968 only - Feb 18 2:00s 1:00 BST # The British Standard Time Act, 1968 # (no summer time) # The Summer Time Act, 1972 Rule GB-Eire 1972 1980 - Mar Sun>=16 2:00s 1:00 BST Rule GB-Eire 1972 1980 - Oct Sun>=23 2:00s 0 GMT ... Comments about the history: # From Paul Eggert (2001-07-18): # # For lack of other data, we'll follow Shanks for Eire in 1940-1948. # # Given Ilieve and Myers's data, the following claims by Shanks are incorrect: # * Wales did not switch from GMT to daylight saving time until # 1921 Apr 3, when they began to conform with the rest of Great Britain. # Actually, Wales was identical after 1880. # * Eire had two transitions on 1916 Oct 1. # It actually just had one transition. # * Northern Ireland used single daylight saving time throughout WW II. # Actually, it conformed to Britain. # * GB-Eire changed standard time to 1 hour ahead of GMT on 1968-02-18. # Actually, that date saw the usual switch to summer time. # Standard time was not changed until 1968-10-27 (the clocks didn't change). Java (1.4.0) seems to be working correctly based on the public time zone data. So I'm closing this as not a bug. (See the Solaris or Linux zic man page for time zone data format.) ###@###.### 2002-02-28
28-02-2002