diff options
-rw-r--r-- | elsie.nci.nih.gov/src/asctime.c | 13 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/asia | 28 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/australasia | 93 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/localtime.c | 23 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/southamerica | 38 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/tz-art.htm | 7 |
6 files changed, 123 insertions, 79 deletions
diff --git a/elsie.nci.nih.gov/src/asctime.c b/elsie.nci.nih.gov/src/asctime.c index e0804f1..52586c6 100644 --- a/elsie.nci.nih.gov/src/asctime.c +++ b/elsie.nci.nih.gov/src/asctime.c @@ -11,7 +11,7 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)asctime.c 8.2"; +static char elsieid[] = "@(#)asctime.c 8.5"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -91,6 +91,10 @@ char * buf; char year[INT_STRLEN_MAXIMUM(int) + 2]; char result[MAX_ASCTIME_BUF_SIZE]; + if (timeptr == NULL) { + errno = EINVAL; + return strcpy(buf, "??? ??? ?? ??:??:?? ????\n"); + } if (timeptr->tm_wday < 0 || timeptr->tm_wday >= DAYSPERWEEK) wn = "???"; else wn = wday_name[timeptr->tm_wday]; @@ -113,10 +117,9 @@ char * buf; timeptr->tm_mday, timeptr->tm_hour, timeptr->tm_min, timeptr->tm_sec, year); - if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime) { - (void) strcpy(buf, result); - return buf; - } else { + if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime) + return strcpy(buf, result); + else { #ifdef EOVERFLOW errno = EOVERFLOW; #else /* !defined EOVERFLOW */ diff --git a/elsie.nci.nih.gov/src/asia b/elsie.nci.nih.gov/src/asia index e9780ac..41aeb4b 100644 --- a/elsie.nci.nih.gov/src/asia +++ b/elsie.nci.nih.gov/src/asia @@ -1,4 +1,4 @@ -# @(#)asia 8.51 +# @(#)asia 8.55 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -225,11 +225,31 @@ Zone Asia/Bahrain 3:22:20 - LMT 1920 # Al Manamah # until further notice." I take that last sentence as the # establishment of a rule. +# From Nobutomo Nakano (2010-02-19): +# We received a report from Bangladesh saying that the start/end of +# Bangladesh DST is incorrect. Currently we have only the Bengali version +# of the official mail from BTRC which describes the following: +# +# "From 2010 each year when local standard time is about to reach +# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM) +# and when local daylight time is about to October 31 at 11:59:00 PM +# clocks are turned backward 1 hour (10:59:00 PM)." +# +# So, DST will start/end 1 minute earlier. + +# From Arthur David Olson (2010-03-03): +# The file +# <a href=http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf> +# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf +# </a> +# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59" +# which is consistent with the information provided by Nobutomo Nakano. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Dhaka 2009 only - Jun 19 23:00 1:00 S -Rule Dhaka 2010 only - Jan 1 0:00 0 - -Rule Dhaka 2010 max - Mar 31 23:00 1:00 S -Rule Dhaka 2010 max - Nov 1 0:00 0 - +Rule Dhaka 2009 only - Dec 31 23:59 0 - +Rule Dhaka 2010 max - Mar 31 22:59 1:00 S +Rule Dhaka 2010 max - Oct 31 23:59 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 diff --git a/elsie.nci.nih.gov/src/australasia b/elsie.nci.nih.gov/src/australasia index 3812390..614a446 100644 --- a/elsie.nci.nih.gov/src/australasia +++ b/elsie.nci.nih.gov/src/australasia @@ -1,5 +1,5 @@ # <pre> -# @(#)australasia 8.15 +# @(#)australasia 8.16 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -267,11 +267,30 @@ Zone Indian/Cocos 6:27:40 - LMT 1900 # <a href="http://www.fiji.gov.fj/publish/page_16198.shtml"> # http://www.fiji.gov.fj/publish/page_16198.shtml # </a> + +# From Steffen Thorsen (2010-03-03): +# The Cabinet in Fiji has decided to end DST about a month early, on +# 2010-03-28 at 03:00. +# The plan is to observe DST again, from 2010-10-24 to sometime in March +# 2011 (last Sunday a good guess?). +# +# Official source: +# <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=1096:3310-cabinet-approves-change-in-daylight-savings-dates&catid=49:cabinet-releases&Itemid=166"> +# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=1096:3310-cabinet-approves-change-in-daylight-savings-dates&catid=49:cabinet-releases&Itemid=166 +# </a> +# +# A bit more background info here: +# <a href="http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html"> +# http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.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 - Apr 25 3:00 0 - +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 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fiji 11:53:40 - LMT 1915 Oct 26 # Suva 12:00 Fiji FJ%sT # Fiji Time @@ -449,70 +468,30 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 # Samoa -# From Alexander Krivenyshev (2008-12-06): -# The Samoa government (Western Samoa) may implement DST on the first Sunday of -# October 2009 (October 4, 2009) until the last Sunday of March 2010 (March 28, -# 2010). -# -# "Selected Committee reports to Cabinet on Daylight Saving Time", -# Government of Samoa: -# <a href="http://www.govt.ws/pr_article.cfm?pr_id=560"> -# http://www.govt.ws/pr_article.cfm?pr_id=560 -# </a> -# or -# <a href="http://www.worldtimezone.com/dst_news/dst_news_samoa01.html"> -# http://www.worldtimezone.com/dst_news/dst_news_samoa01.html -# </a> - -# From Steffen Thorsen (2009-08-27): -# Samoa's parliament passed the Daylight Saving Bill 2009, and will start -# daylight saving time on the first Sunday of October 2009 and end on the -# last Sunday of March 2010. We hope that the full text will be published -# soon, but we believe that the bill is only valid for 2009-2010. Samoa's -# Daylight Saving Act 2009 will be enforced as soon as the Head of State -# executes a proclamation publicizing this Act. +# From Steffen Thorsen (2009-10-16): +# We have been in contact with the government of Samoa again, and received +# the following info: +# +# "Cabinet has now approved Daylight Saving to be effected next year +# commencing from the last Sunday of September 2010 and conclude first +# Sunday of April 2011." # -# Some background information here, which will be updated once we have -# more details: +# Background info: # <a href="http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html"> # http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html # </a> - -# From Alexander Krivenyshev (2009-10-03): -# First, my deepest condolences to people of Samoa islands and all families and -# loved ones around the world who lost their lives in the earthquake and tsunami. -# -# Considering the recent devastation on Samoa by earthquake and tsunami and that -# many government offices/ ministers are closed- not sure if "Daylight Saving -# Bill 2009" will be implemented in next few days- on October 4, 2009. -# -# Here is reply from Consulate-General of Samoa in New Zealand -# --------------------------- -# Consul General -# consulgeneral@samoaconsulate.org.nz # -# Talofa Alexander, -# -# Thank you for your sympathy for our country but at this time we have not -# been informed about the Daylight Savings Time Change. Most Ministries in -# Apia are closed or relocating due to weather concerns. -# -# When we do find out if they are still proceeding with the time change we -# will advise you soonest. -# -# Kind Regards, -# Lana -# for: Consul General - -# From Steffen Thorsen (2009-10-05): -# We have called a hotel in Samoa and asked about local time there - they -# are still on standard time. +# Samoa's Daylight Saving Time Act 2009 is available here, but does not +# contain any dates: +# <a href="http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf"> +# http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf +# </a> Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 -11:30 - SAMT 1950 # Samoa Time - -11:00 - WST 2009 Oct 4 - -11:00 1:00 WSDT 2010 Mar 28 + -11:00 - WST 2010 Oct 24 + -11:00 1:00 WSDT 2011 Apr 3 -11:00 - WST # Solomon Is diff --git a/elsie.nci.nih.gov/src/localtime.c b/elsie.nci.nih.gov/src/localtime.c index d186080..f5833e8 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.9"; +static char elsieid[] = "@(#)localtime.c 8.13"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -350,6 +350,7 @@ register const int doextend; 4 * TZ_MAX_TIMES]; } u; + sp->goback = sp->goahead = FALSE; if (name == NULL && (name = TZDEFAULT) == NULL) return -1; { @@ -555,7 +556,6 @@ register const int doextend; sp->ttis[sp->typecnt++] = ts.ttis[1]; } } - sp->goback = sp->goahead = FALSE; if (sp->timecnt > 1) { for (i = 1; i < sp->timecnt; ++i) if (typesequiv(sp, sp->types[i], sp->types[0]) && @@ -1163,7 +1163,7 @@ tzsetwall(void) #ifdef ALL_STATE if (lclptr == NULL) { - lclptr = (struct state *) malloc(sizeof *lclptr); + lclptr = (struct state *) calloc(1, sizeof *lclptr); if (lclptr == NULL) { settzname(); /* all we can do */ return; @@ -1194,7 +1194,7 @@ tzset(void) #ifdef ALL_STATE if (lclptr == NULL) { - lclptr = (struct state *) malloc(sizeof *lclptr); + lclptr = (struct state *) calloc(1, sizeof *lclptr); if (lclptr == NULL) { settzname(); /* all we can do */ return; @@ -1355,7 +1355,7 @@ struct tm * const tmp; if (!gmt_is_set) { gmt_is_set = TRUE; #ifdef ALL_STATE - gmtptr = (struct state *) malloc(sizeof *gmtptr); + gmtptr = (struct state *) calloc(1, sizeof *gmtptr); if (gmtptr != NULL) #endif /* defined ALL_STATE */ gmtload(gmtptr); @@ -1889,6 +1889,10 @@ const long offset; int types[TZ_MAX_TYPES]; int okay; + if (tmp == NULL) { + errno = EINVAL; + return WRONG; + } if (tmp->tm_isdst > 1) tmp->tm_isdst = 1; t = time2(tmp, funcp, offset, &okay); @@ -1960,7 +1964,8 @@ time_t timelocal(tmp) struct tm * const tmp; { - tmp->tm_isdst = -1; /* in case it wasn't initialized */ + if (tmp != NULL) + tmp->tm_isdst = -1; /* in case it wasn't initialized */ return mktime(tmp); } @@ -1968,7 +1973,8 @@ time_t timegm(tmp) struct tm * const tmp; { - tmp->tm_isdst = 0; + if (tmp != NULL) + tmp->tm_isdst = 0; return time1(tmp, gmtsub, 0L); } @@ -1977,7 +1983,8 @@ timeoff(tmp, offset) struct tm * const tmp; const long offset; { - tmp->tm_isdst = 0; + if (tmp != NULL) + tmp->tm_isdst = 0; return time1(tmp, gmtsub, offset); } diff --git a/elsie.nci.nih.gov/src/southamerica b/elsie.nci.nih.gov/src/southamerica index 9c4edcb..8db45cc 100644 --- a/elsie.nci.nih.gov/src/southamerica +++ b/elsie.nci.nih.gov/src/southamerica @@ -1,5 +1,5 @@ # <pre> -# @(#)southamerica 8.40 +# @(#)southamerica 8.43 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -1121,6 +1121,18 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # http://www.shoa.cl/noticias/2008/04hora/hora.htm # </a>. +# From Angel Chiang (2010-03-04): +# Subject: DST in Chile exceptionally extended to 3 April due to earthquake +# <a href="http://www.gobiernodechile.cl/viewNoticia.aspx?idArticulo=30098"> +# http://www.gobiernodechile.cl/viewNoticia.aspx?idArticulo=30098 +# </a> +# (in Spanish, last paragraph). +# +# This is breaking news. There should be more information available later. + +# From Arthur Daivd Olson (2010-03-06): +# Angel Chiang's message confirmed by Julio Pacheco; Julio provided a patch. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Chile 1927 1932 - Sep 1 0:00 1:00 S Rule Chile 1928 1932 - Apr 1 0:00 0 - @@ -1155,7 +1167,9 @@ Rule Chile 2000 2007 - Mar Sun>=9 3:00u 0 - # N.B.: the end of March 29 in Chile is March 30 in Universal time, # which is used below in specifying the transition. Rule Chile 2008 only - Mar 30 3:00u 0 - -Rule Chile 2009 max - Mar Sun>=9 3:00u 0 - +Rule Chile 2009 only - Mar Sun>=9 3:00u 0 - +Rule Chile 2010 only - Apr 4 3:00u 0 - +Rule Chile 2011 max - Mar Sun>=9 3:00u 0 - # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1364,8 +1378,24 @@ Rule Para 2002 2003 - Sep Sun>=1 0:00 1:00 S # Decree 1,867 (2004-03-05) # From Carlos Raul Perasso via Jesper Norgaard Welen (2006-10-13) # <http://www.presidencia.gov.py/decretos/D1867.pdf> -Rule Para 2004 max - Oct Sun>=15 0:00 1:00 S -Rule Para 2005 max - Mar Sun>=8 0:00 0 - +Rule Para 2004 2009 - Oct Sun>=15 0:00 1:00 S +Rule Para 2005 2009 - Mar Sun>=8 0:00 0 - +# From Carlos Raul Perasso (2010-02-18): +# By decree number 3958 issued yesterday ( +# <a href="http://www.presidencia.gov.py/v1/wp-content/uploads/2010/02/decreto3958.pdf"> +# http://www.presidencia.gov.py/v1/wp-content/uploads/2010/02/decreto3958.pdf +# </a> +# ) +# Paraguay changes its DST schedule, postponing the March rule to April and +# modifying the October date. The decree reads: +# ... +# Art. 1. It is hereby established that from the second Sunday of the month of +# April of this year (2010), the official time is to be set back 60 minutes, +# and that on the first Sunday of the month of October, it is to be set +# forward 60 minutes, in all the territory of the Paraguayan Republic. +# ... +Rule Para 2010 max - Oct Sun>=1 0:00 1:00 S +Rule Para 2010 max - Apr Sun>=8 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Asuncion -3:50:40 - LMT 1890 diff --git a/elsie.nci.nih.gov/src/tz-art.htm b/elsie.nci.nih.gov/src/tz-art.htm index a3a9eed..49df2ff 100644 --- a/elsie.nci.nih.gov/src/tz-art.htm +++ b/elsie.nci.nih.gov/src/tz-art.htm @@ -9,7 +9,7 @@ PUBLIC "-//W3C//DTD HTML 4.01//EN" <body> <h1>Time and the Arts</h1> <address> -@(#)tz-art.htm 8.15 +@(#)tz-art.htm 8.16 </address> <p> This file is in the public domain, so clarified as of @@ -366,6 +366,11 @@ premonition in the "We Had a Dream" episode of "Medium" (originally aired 2007-02-28). </li> <li> +In the "30 Rock" episode "Anna Howard Shaw Day" (first broadcast 2010-02-11), +Jack Donaghy's date realizes that a Geneva-to-New-York business phone call +received in the evening must be fake given the difference in local times. +</li> +<li> In the 1946 movie "A Matter of Life and Death" (U.S. title "Stairway to Heaven") there is a reference to British Double Summer Time. |