diff options
author | Stuart Bishop <stuart@stuartbishop.net> | 2010-11-18 18:15:42 +0700 |
---|---|---|
committer | Stuart Bishop <stuart@stuartbishop.net> | 2010-11-18 18:15:42 +0700 |
commit | 1923eb23159cb3a2182104fc1bb91e20c93aadca (patch) | |
tree | d1423fc85712941e0f74e936f1bc2bddfb653173 | |
parent | 406445fb5b5f42c1952fd8d4c61a15adc8810570 (diff) | |
download | pytz-1923eb23159cb3a2182104fc1bb91e20c93aadca.tar.gz |
Olson 2010o
-rw-r--r-- | elsie.nci.nih.gov/src/Makefile | 8 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/Theory | 5 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/australasia | 29 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/localtime.c | 7 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/zic.c | 24 |
5 files changed, 56 insertions, 17 deletions
diff --git a/elsie.nci.nih.gov/src/Makefile b/elsie.nci.nih.gov/src/Makefile index dd154b3..892d116 100644 --- a/elsie.nci.nih.gov/src/Makefile +++ b/elsie.nci.nih.gov/src/Makefile @@ -1,5 +1,5 @@ # <pre> -# @(#)Makefile 8.8 +# @(#)Makefile 8.9 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -12,7 +12,7 @@ # make zonenames # to get a list of the values you can use for LOCALTIME. -LOCALTIME= Factory +LOCALTIME= GMT # If you want something other than Eastern United States time as a template # for handling POSIX-style time zone environment variables, @@ -262,8 +262,8 @@ MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \ DOCS= README Theory $(MANS) date.1 Makefile PRIMARY_YDATA= africa antarctica asia australasia \ europe northamerica southamerica -YDATA= $(PRIMARY_YDATA) pacificnew etcetera factory backward -NDATA= systemv +YDATA= $(PRIMARY_YDATA) pacificnew etcetera backward +NDATA= systemv factory SDATA= solar87 solar88 solar89 TDATA= $(YDATA) $(NDATA) $(SDATA) TABDATA= iso3166.tab zone.tab diff --git a/elsie.nci.nih.gov/src/Theory b/elsie.nci.nih.gov/src/Theory index abdad24..b1e6bd5 100644 --- a/elsie.nci.nih.gov/src/Theory +++ b/elsie.nci.nih.gov/src/Theory @@ -1,4 +1,4 @@ -@(#)Theory 8.4 +@(#)Theory 8.5 This file is in the public domain, so clarified as of 2009-05-17 by Arthur David Olson. @@ -287,8 +287,7 @@ and these older names are still supported. See the file `backward' for most of these older names (e.g. `US/Eastern' instead of `America/New_York'). The other old-fashioned names still supported are -`WET', `CET', `MET', `EET' (see the file `europe'), -and `Factory' (see the file `factory'). +`WET', `CET', `MET', and `EET' (see the file `europe'). ----- Time zone abbreviations ----- diff --git a/elsie.nci.nih.gov/src/australasia b/elsie.nci.nih.gov/src/australasia index 36a81b0..2c8f7db 100644 --- a/elsie.nci.nih.gov/src/australasia +++ b/elsie.nci.nih.gov/src/australasia @@ -1,5 +1,5 @@ # <pre> -# @(#)australasia 8.18 +# @(#)australasia 8.20 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -284,13 +284,26 @@ Zone Indian/Cocos 6:27:40 - LMT 1900 # http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html # </a> +# From Alexander Krivenyshev (2010-10-24): +# According to Radio Fiji and Fiji Times online, Fiji will end DST 3 +# weeks earlier than expected - on March 6, 2011, not March 27, 2011... +# Here is confirmation from Government of the Republic of the Fiji Islands, +# Ministry of Information (fiji.gov.fj) web site: +# <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=2608:daylight-savings&catid=71:press-releases&Itemid=155"> +# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=2608:daylight-savings&catid=71:press-releases&Itemid=155 +# </a> +# or +# <a href="http://www.worldtimezone.com/dst_news/dst_news_fiji04.html"> +# http://www.worldtimezone.com/dst_news/dst_news_fiji04.html +# </a> + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S Rule Fiji 1999 2000 - Feb lastSun 3:00 0 - Rule Fiji 2009 only - Nov 29 2:00 1:00 S Rule Fiji 2010 only - Mar lastSun 3:00 0 - Rule Fiji 2010 only - Oct 24 2:00 1:00 S -Rule Fiji 2011 only - Mar lastSun 3:00 0 - +Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fiji 11:53:40 - LMT 1915 Oct 26 # Suva 12:00 Fiji FJ%sT # Fiji Time @@ -487,11 +500,21 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 # http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf # </a> +# From Raymond Hughes (2010-10-07): +# Please see +# <a href="http://www.mcil.gov.ws"> +# http://www.mcil.gov.ws +# </a>, +# the Ministry of Commerce, Industry and Labour (sideframe) "Last Sunday +# September 2010 (26/09/10) - adjust clocks forward from 12:00 midnight +# to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks +# backwards from 1:00am to 12:00am" + Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 -11:30 - SAMT 1950 # Samoa Time -11:00 - WST 2010 Sep 26 - -11:00 1:00 WSDT 2011 Apr 3 + -11:00 1:00 WSDT 2011 Apr 3 1:00 -11:00 - WST # Solomon Is diff --git a/elsie.nci.nih.gov/src/localtime.c b/elsie.nci.nih.gov/src/localtime.c index d397472..13c11aa 100644 --- a/elsie.nci.nih.gov/src/localtime.c +++ b/elsie.nci.nih.gov/src/localtime.c @@ -5,7 +5,7 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)localtime.c 8.14"; +static char elsieid[] = "@(#)localtime.c 8.15"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -914,6 +914,7 @@ const int lastditch; register unsigned char * typep; register char * cp; register int load_result; + static struct ttinfo zttinfo; INITIALIZE(dstname); stdname = name; @@ -986,6 +987,7 @@ const int lastditch; /* ** Two transitions per year, from EPOCH_YEAR forward. */ + sp->ttis[0] = sp->ttis[1] = zttinfo; sp->ttis[0].tt_gmtoff = -dstoffset; sp->ttis[0].tt_isdst = 1; sp->ttis[0].tt_abbrind = stdlen + 1; @@ -1099,8 +1101,8 @@ const int lastditch; } /* ** Finally, fill in ttis. - ** ttisstd and ttisgmt need not be handled. */ + sp->ttis[0] = sp->ttis[1] = zttinfo; sp->ttis[0].tt_gmtoff = -stdoffset; sp->ttis[0].tt_isdst = FALSE; sp->ttis[0].tt_abbrind = 0; @@ -1113,6 +1115,7 @@ const int lastditch; dstlen = 0; sp->typecnt = 1; /* only standard time */ sp->timecnt = 0; + sp->ttis[0] = zttinfo; sp->ttis[0].tt_gmtoff = -stdoffset; sp->ttis[0].tt_isdst = 0; sp->ttis[0].tt_abbrind = 0; diff --git a/elsie.nci.nih.gov/src/zic.c b/elsie.nci.nih.gov/src/zic.c index 71ab562..a75d8c7 100644 --- a/elsie.nci.nih.gov/src/zic.c +++ b/elsie.nci.nih.gov/src/zic.c @@ -3,7 +3,7 @@ ** 2006-07-17 by Arthur David Olson. */ -static char elsieid[] = "@(#)zic.c 8.22"; +static char elsieid[] = "@(#)zic.c 8.24"; #include "private.h" #include "locale.h" @@ -1881,16 +1881,16 @@ const long gmtoff; register int week; if (rp->r_dycode == DC_DOWGEQ) { - week = 1 + rp->r_dayofmonth / DAYSPERWEEK; - if ((week - 1) * DAYSPERWEEK + 1 != rp->r_dayofmonth) + if ((rp->r_dayofmonth % DAYSPERWEEK) != 1) return -1; + week = 1 + rp->r_dayofmonth / DAYSPERWEEK; } else if (rp->r_dycode == DC_DOWLEQ) { if (rp->r_dayofmonth == len_months[1][rp->r_month]) week = 5; else { - week = 1 + rp->r_dayofmonth / DAYSPERWEEK; - if (week * DAYSPERWEEK - 1 != rp->r_dayofmonth) + if ((rp->r_dayofmonth % DAYSPERWEEK) != 0) return -1; + week = rp->r_dayofmonth / DAYSPERWEEK; } } else return -1; /* "cannot happen" */ (void) sprintf(result, "M%d.%d.%d", @@ -2018,6 +2018,7 @@ const int zonecount; register char * envvar; register int max_abbr_len; register int max_envvar_len; + register int prodstic; /* all rules are min to max */ max_abbr_len = 2 + max_format_len + max_abbrvar_len; max_envvar_len = 2 * max_abbr_len + 5 * 9; @@ -2032,6 +2033,7 @@ const int zonecount; timecnt = 0; typecnt = 0; charcnt = 0; + prodstic = zonecount == 1; /* ** Thanks to Earl Chew ** for noting the need to unconditionally initialize startttisstd. @@ -2053,6 +2055,8 @@ const int zonecount; updateminmax(rp->r_loyear); if (rp->r_hiwasnum) updateminmax(rp->r_hiyear); + if (rp->r_lowasnum || rp->r_hiwasnum) + prodstic = FALSE; } } /* @@ -2075,6 +2079,16 @@ wp = ecpyalloc(_("no POSIX environment variable for zone")); if (max_year <= INT_MAX - YEARSPERREPEAT) max_year += YEARSPERREPEAT; else max_year = INT_MAX; + /* + ** Regardless of any of the above, + ** for a "proDSTic" zone which specifies that its rules + ** always have and always will be in effect, + ** we only need one cycle to define the zone. + */ + if (prodstic) { + min_year = 1900; + max_year = min_year + YEARSPERREPEAT; + } } /* ** For the benefit of older systems, |