Fix European timezones.

This commit is contained in:
Serge Vakulenko
2015-10-20 13:30:41 -07:00
parent 7562e8e410
commit c1ff69edd2
3 changed files with 28 additions and 43 deletions

View File

@@ -993,7 +993,6 @@ file /share/zoneinfo/CST6CDT
file /share/zoneinfo/EET
file /share/zoneinfo/EST
file /share/zoneinfo/EST5EDT
file /share/zoneinfo/GB-Eire
file /share/zoneinfo/GMT-12
file /share/zoneinfo/GMT-11
file /share/zoneinfo/GMT-10
@@ -1022,13 +1021,10 @@ file /share/zoneinfo/GMT+12
file /share/zoneinfo/GMT+13
file /share/zoneinfo/Greenwich
file /share/zoneinfo/HST
file /share/zoneinfo/Iceland
file /share/zoneinfo/Japan
file /share/zoneinfo/MET
file /share/zoneinfo/MST
file /share/zoneinfo/MST7MDT
file /share/zoneinfo/NZ
file /share/zoneinfo/Poland
file /share/zoneinfo/PST8PDT
file /share/zoneinfo/Singapore
file /share/zoneinfo/SystemV/AST4

View File

@@ -21,17 +21,13 @@
# and off at 00:00 standard time (i.e., 01:00 DST)
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule GB-Eire 1986 max - Mar lastSun 1:00s 1:00 BST
Rule GB-Eire 1986 max - Oct lastSun 1:00s 0 GMT
Rule EU 1979 1995 - Sep lastSun 1:00s 0 -
Rule EU 1981 max - Mar lastSun 1:00s 1:00 "S"
Rule EU 1996 max - Oct lastSun 1:00s 0 -
Rule W-Eur 1986 max - Mar lastSun 1:00s 1:00 " DST"
Rule W-Eur 1986 max - Sep lastSun 1:00s 0 -
Rule M-Eur 1986 max - Mar lastSun 2:00s 1:00 " DST"
Rule M-Eur 1986 max - Sep lastSun 2:00s 0 -
Rule E-Eur 1986 max - Mar lastSun 3:00s 1:00 " DST"
Rule E-Eur 1986 max - Sep lastSun 3:00s 0 -
Rule C-Eur 1979 1995 - Sep lastSun 2:00s 0 -
Rule C-Eur 1981 max - Mar lastSun 2:00s 1:00 "S"
Rule C-Eur 1996 max - Oct lastSun 2:00s 0 -
Rule Turkey 1986 max - Mar lastSun 1:00 1:00 " DST"
Rule Turkey 1986 max - Sep lastSun 1:00 0 -
@@ -40,18 +36,11 @@ Rule W-SU 1986 max - Mar lastSun 2:00s 1:00 " DST"
Rule W-SU 1986 max - Sep lastSun 2:00s 0 -
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
Zone GB-Eire 0:00 GB-Eire %s
Zone WET 0:00 W-Eur WET%s
Zone Iceland 0:00 - WET
Zone MET 1:00 M-Eur MET%s
Zone Poland 1:00 W-Eur MET%s
Zone EET 2:00 E-Eur EET%s
Zone Turkey 3:00 Turkey EET%s
Zone W-SU 3:00 M-Eur ????
# Tom Hoffman says that MET is also known as Central European Time
Link MET CET
Zone WET 0:00 EU WE%sT
Zone CET 1:00 C-Eur CE%sT
Zone EET 2:00 EU EE%sT
Zone Turkey 3:00 Turkey EE%sT
Zone W-SU 3:00 C-Eur ????
#
# And now, letters on the subject. . .
@@ -65,27 +54,27 @@ Link MET CET
# ...
# Subject: Time zone handling
# ...
#
#
# ...the European time rules are...standardized since 1981, when
# most European counrties started DST. Before that year, only
# a few countries (UK, France, Italy) had DST, each according
# to own national rules. In 1981, however, DST started on
# 'Apr firstSun', and not on 'Mar lastSun' as in the following
# years...
# But also since 1981 there are some more national exceptions
# than listed in 'europe': Switzerland, for example, joined DST
# one year later, Denmark ended DST on 'Oct 1' instead of 'Sep
# But also since 1981 there are some more national exceptions
# than listed in 'europe': Switzerland, for example, joined DST
# one year later, Denmark ended DST on 'Oct 1' instead of 'Sep
# lastSun' in 1981---I don't know how they handle now.
#
#
# Finally, DST ist always from 'Apr 1' to 'Oct 1' in the
# Soviet Union (as far as I know).
#
# Soviet Union (as far as I know).
#
# Tom Hofmann, Scientific Computer Center, CIBA-GEIGY AG,
# 4002 Basle, Switzerland
# UUCP: ...!mcvax!cernvax!cgcha!wtho
#
###############################################################################
#
#
# ...
# Date: Wed, 4 Feb 87 22:35:22 +0100
# From: seismo!mcvax!cwi.nl!dik (Dik T. Winter)
@@ -93,11 +82,11 @@ Link MET CET
# ...
# Subject: timezones
# ...
#
#
# The information from Tom Hofmann is (as far as I know) not entirely correct.
# After a request from chongo at amdahl I tried to retrieve all information
# about DST in Europe. I was able to find all from about 1969.
#
#
# ...standardization
# on DST in Europe started in about 1977 with switches on first Sunday in
# April and last Sunday in September. In UK it was from last but 1 Sunday
@@ -108,7 +97,7 @@ Link MET CET
# dates. Note that currently in the UK the switch back date appears not
# to be the last Sunday in October, but 4 weeks after the last Sunday in
# September (withness 1982 and 1983 with terminating days October 24 and 23).
#
#
# It should also be remembered that time-zones are not constants; e.g.
# Portugal switched in 1976 from MET (or CET) to WET with DST, and the UK
# used MET throughout from 1967 to 1969, and WET with DST before and after
@@ -118,7 +107,7 @@ Link MET CET
# assumed that DST is 1 hour ahead of normal time, this need not be the
# case; at least in the Netherlands there have been times when DST was 2 hours
# in advance of normal time.
#
#
# ...
# dik t. winter, cwi, amsterdam, nederland
# INTERNET : dik@cwi.nl

View File

@@ -448,7 +448,8 @@ char * argv[];
static void
setboundaries()
{
register time_t bit;
register time_t bit;
struct tm zerotm = {0};
for (bit = 1; bit > 0; bit <<= 1)
;
@@ -458,10 +459,9 @@ setboundaries()
max_time = ~(time_t) 0;
} else {
tt_signed = TRUE;
min_time = bit;
max_time = bit;
++max_time;
max_time = -max_time;
min_time = mktime(&zerotm);
zerotm.tm_year = TZ_MAX_TIMES/2 - 2;
max_time = mktime(&zerotm);
}
min_year = TM_YEAR_BASE + gmtime(&min_time)->tm_year;
max_year = TM_YEAR_BASE + gmtime(&max_time)->tm_year;