proposed time zone package changes (Hong Kong, Vostok, zic.c)

Arthur David Olson olsona at lecserver.nci.nih.gov
Thu Sep 16 22:27:12 UTC 2010


Below find proposed changes to the time zone package; the executive summary:

*	asia		No DST in Hong Kong in 1977
			(thanks to Jesper Norgaard for finding the problem).
*	zic.c		Conditionally output extra types with most-recently-used
			offsets last (for use by systems with pre-2011 versions
			of localtime.c, helping to ensure that globals "altzone"
			and "timezone" get set correctly).
*	zone.tab	Remove obsolete association of Vostok Station with
			South Magnetic Pole; add association with Lake Vostok
			(thanks to Petr Machata for finding the problem).

The "zic.c" changes result in some changed binary files, but the same output
as with the current version of the package is produced by a
"zdump -v all/files/in/the/zoneinfo/tree"

If no problems are found, I plan to update the ftp versions on 2010-09-27.

				--ado

diff -r -c old/asia new/asia
*** old/asia	Mon Aug 16 06:57:06 2010
--- new/asia	Thu Sep 16 13:29:33 2010
***************
*** 1,4 ****
! # @(#)asia	8.61
  # This file is in the public domain, so clarified as of
  # 2009-05-17 by Arthur David Olson.
  
--- 1,4 ----
! # @(#)asia	8.62
  # This file is in the public domain, so clarified as of
  # 2009-05-17 by Arthur David Olson.
  
***************
*** 547,554 ****
  Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
  Rule	HK	1954	only	-	Oct	31	3:30	0	-
  Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
! Rule	HK	1965	1977	-	Apr	Sun>=16	3:30	1:00	S
! Rule	HK	1965	1977	-	Oct	Sun>=16	3:30	0	-
  Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
  Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
  Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
--- 547,554 ----
  Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
  Rule	HK	1954	only	-	Oct	31	3:30	0	-
  Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
! Rule	HK	1965	1976	-	Apr	Sun>=16	3:30	1:00	S
! Rule	HK	1965	1976	-	Oct	Sun>=16	3:30	0	-
  Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
  Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
  Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
diff -r -c old/zic.c new/zic.c
*** old/zic.c	Mon Aug 16 06:57:05 2010
--- new/zic.c	Thu Sep 16 14:55:31 2010
***************
*** 3,9 ****
  ** 2006-07-17 by Arthur David Olson.
  */
  
! static char	elsieid[] = "@(#)zic.c	8.20";
  
  #include "private.h"
  #include "locale.h"
--- 3,9 ----
  ** 2006-07-17 by Arthur David Olson.
  */
  
! static char	elsieid[] = "@(#)zic.c	8.22";
  
  #include "private.h"
  #include "locale.h"
***************
*** 1621,1626 ****
--- 1621,1672 ----
  			if (thistimei == 0)
  				writetype[0] = TRUE;
  		}
+ #ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH
+ 		/*
+ 		** For some pre-2011 systems: if the last-to-be-written
+ 		** standard (or daylight) type has an offset different from the
+ 		** most recently used offset,
+ 		** append an (unused) copy of the most recently used type
+ 		** (to help get global "altzone" and "timezone" variables
+ 		** set correctly).
+ 		*/
+ 		{
+ 			register int	mrudst, mrustd, hidst, histd, type;
+ 
+ 			hidst = histd = mrudst = mrustd = -1;
+ 			for (i = thistimei; i < thistimelim; ++i)
+ 				if (isdsts[types[i]])
+ 					mrudst = types[i];
+ 				else	mrustd = types[i];
+ 			for (i = 0; i < typecnt; ++i)
+ 				if (writetype[i])
+ 					if (isdsts[i])
+ 						hidst = i;
+ 					else	histd = i;
+ 			if (hidst >= 0 && mrudst >= 0 && hidst != mrudst &&
+ 				gmtoffs[hidst] != gmtoffs[mrudst]) {
+ 					isdsts[mrudst] = -1;
+ 					type = addtype(gmtoffs[mrudst],
+ 						&chars[abbrinds[mrudst]],
+ 						TRUE,
+ 						ttisstds[mrudst],
+ 						ttisgmts[mrudst]);
+ 					isdsts[mrudst] = TRUE;
+ 					writetype[type] = TRUE;
+ 			}
+ 			if (histd >= 0 && mrustd >= 0 && histd != mrustd &&
+ 				gmtoffs[histd] != gmtoffs[mrustd]) {
+ 					isdsts[mrustd] = -1;
+ 					type = addtype(gmtoffs[mrustd],
+ 						&chars[abbrinds[mrustd]],
+ 						FALSE,
+ 						ttisstds[mrustd],
+ 						ttisgmts[mrustd]);
+ 					isdsts[mrustd] = FALSE;
+ 					writetype[type] = TRUE;
+ 			}
+ 		}
+ #endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */
  		thistypecnt = 0;
  		for (i = 0; i < typecnt; ++i)
  			typemap[i] = writetype[i] ?  thistypecnt++ : -1;
diff -r -c old/zone.tab new/zone.tab
*** old/zone.tab	Mon Aug 16 06:57:07 2010
--- new/zone.tab	Thu Sep 16 13:29:34 2010
***************
*** 1,5 ****
  # <pre>
! # @(#)zone.tab	8.37
  # This file is in the public domain, so clarified as of
  # 2009-05-17 by Arthur David Olson.
  #
--- 1,5 ----
  # <pre>
! # @(#)zone.tab	8.38
  # This file is in the public domain, so clarified as of
  # 2009-05-17 by Arthur David Olson.
  #
***************
*** 41,47 ****
  AQ	-6736+06253	Antarctica/Mawson	Mawson Station, Holme Bay
  AQ	-6835+07758	Antarctica/Davis	Davis Station, Vestfold Hills
  AQ	-6617+11031	Antarctica/Casey	Casey Station, Bailey Peninsula
! AQ	-7824+10654	Antarctica/Vostok	Vostok Station, S Magnetic Pole
  AQ	-6640+14001	Antarctica/DumontDUrville	Dumont-d'Urville Station, Terre Adelie
  AQ	-690022+0393524	Antarctica/Syowa	Syowa Station, E Ongul I
  AQ	-5430+15857	Antarctica/Macquarie	Macquarie Island Station, Macquarie Island
--- 41,47 ----
  AQ	-6736+06253	Antarctica/Mawson	Mawson Station, Holme Bay
  AQ	-6835+07758	Antarctica/Davis	Davis Station, Vestfold Hills
  AQ	-6617+11031	Antarctica/Casey	Casey Station, Bailey Peninsula
! AQ	-7824+10654	Antarctica/Vostok	Vostok Station, Lake Vostok
  AQ	-6640+14001	Antarctica/DumontDUrville	Dumont-d'Urville Station, Terre Adelie
  AQ	-690022+0393524	Antarctica/Syowa	Syowa Station, E Ongul I
  AQ	-5430+15857	Antarctica/Macquarie	Macquarie Island Station, Macquarie Island



More information about the tz mailing list