"" | 20 Oct 08:19 2014
Picon

[tz] Fiji DST, starts 2nd November

Matt Johnson | 17 Oct 20:16 2014
Picon

[tz] Canadian time zones official site link

The TZ source comments for Canada references the INMS, but the link there is dead.  Archive.org's last
copy was taken in June 2006:
https://web.archive.org/web/20060710032930/http://inms-ienm.nrc-cnrc.gc.ca/en/time_services/daylight_saving_e.php

It appears that the INMS is/was a division of the NRC, and I've found the current time zone page for the NRC here:
http://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html

The pages appear very similar.  Please update the comments in the TZ source accordingly.  Thanks. 		 	   		  
Matt Johnson | 16 Oct 21:20 2014
Picon

[tz] zone.tab deprecation

I understand the differences between zone.tab and zone1970.tab, but why does zone.tab have to be
deprecated?  Can't we just maintain both files indefinitely?  Then developers can choose whichever
file makes sense for their scenario.

Is there a specific reason for the deprecation?

If it is to be dropped at some point - how far out is that, and does it get maintained until then? 		 	   		  
Christos Zoulas | 16 Oct 20:15 2014

[tz] more changes (and a bug fix)

Hi,

Most of these changes make sure that errno is always set appropriately
when the time functions fail.

The bug fix below that when lclptr is allocated, is not zeroed and
the result from zoneinit() was not checked. If zoneinit failed, then
lclptr would contain garbage, and settzname() would coredump because
it assumed that the lclptr contents were sane.

christos

--- localtime.c.orig	2014-10-07 16:20:32.000000000 -0400
+++ localtime.c	2014-10-16 14:10:03.000000000 -0400
 <at>  <at>  -690,17 +690,23  <at>  <at> 
 	register char	c;
 	register int	num;

-	if (strp == NULL || !is_digit(c = *strp))
+	if (strp == NULL || !is_digit(c = *strp)) {
+		errno = EINVAL;
 		return NULL;
+	}
 	num = 0;
 	do {
 		num = num * 10 + (c - '0');
-		if (num > max)
+		if (num > max) {
+			errno = ERANGE;
 			return NULL;	/* illegal value */
+		}
 		c = *++strp;
 	} while (is_digit(c));
-	if (num < min)
+	if (num < min) {
+		errno = ERANGE;
 		return NULL;		/* illegal value */
+	}
 	*nump = num;
 	return strp;
 }
 <at>  <at>  -1202,14 +1208,20  <at>  <at> 
       ? lcl_is_set < 0
       : 0 < lcl_is_set && strcmp(lcl_TZname, name) == 0)
     return;
-  if (0 < lcl)
-    strcpy(lcl_TZname, name);
 #ifdef ALL_STATE
   if (! lclptr)
     lclptr = malloc(sizeof *lclptr);
 #endif /* defined ALL_STATE */
-  zoneinit(lclptr, name);
+  if (!zoneinit(lclptr, name)) {
+#ifdef ALL_STATE
+    free(lclptr);
+    lclptr = NULL;
+#endif
+    return;
+  }
   settzname();
+  if (0 < lcl)
+    strcpy(lcl_TZname, name);
   lcl_is_set = lcl;
 }

 <at>  <at>  -1328,8 +1340,10  <at>  <at> 
 				newt += seconds;
 			else	newt -= seconds;
 			if (newt < sp->ats[0] ||
-				newt > sp->ats[sp->timecnt - 1])
-					return NULL;	/* "cannot happen" */
+				newt > sp->ats[sp->timecnt - 1]) {
+				errno = EINVAL;
+				return NULL;	/* "cannot happen" */
+			}
 			result = localsub(sp, &newt, offset, tmp);
 			if (result) {
 				register int_fast64_t newy;
 <at>  <at>  -1338,8 +1352,10  <at>  <at> 
 				if (t < sp->ats[0])
 					newy -= years;
 				else	newy += years;
-				if (! (INT_MIN <= newy && newy <= INT_MAX))
+				if (! (INT_MIN <= newy && newy <= INT_MAX)) {
+					errno = EOVERFLOW;
 					return NULL;
+				}
 				result->tm_year = newy;
 			}
 			return result;
 <at>  <at>  -1528,13 +1544,13  <at>  <at> 
 		tdelta = tdays / DAYSPERLYEAR;
 		if (! ((! TYPE_SIGNED(time_t) || INT_MIN <= tdelta)
 		       && tdelta <= INT_MAX))
-			return NULL;
+			goto overflow;
 		idelta = tdelta;
 		if (idelta == 0)
 			idelta = (tdays < 0) ? -1 : 1;
 		newy = y;
 		if (increment_overflow(&newy, idelta))
-			return NULL;
+			goto overflow;
 		leapdays = leaps_thru_end_of(newy - 1) -
 			leaps_thru_end_of(y - 1);
 		tdays -= ((time_t) newy - y) * DAYSPERNYEAR;
 <at>  <at>  -1563,17 +1579,17  <at>  <at> 
 	}
 	while (idays < 0) {
 		if (increment_overflow(&y, -1))
-			return NULL;
+			goto overflow;
 		idays += year_lengths[isleap(y)];
 	}
 	while (idays >= year_lengths[isleap(y)]) {
 		idays -= year_lengths[isleap(y)];
 		if (increment_overflow(&y, 1))
-			return NULL;
+			goto overflow;
 	}
 	tmp->tm_year = y;
 	if (increment_overflow(&tmp->tm_year, -TM_YEAR_BASE))
-		return NULL;
+		goto overflow;
 	tmp->tm_yday = idays;
 	/*
 	** The "extra" mods below avoid overflow problems.
 <at>  <at>  -1604,6 +1620,8  <at>  <at> 
 	tmp->TM_GMTOFF = offset;
 #endif /* defined TM_GMTOFF */
 	return tmp;
+overflow:
+	return NULL;
 }

 char *
 <at>  <at>  -1753,20 +1771,21  <at>  <at> 
 	if (do_norm_secs) {
 		if (normalize_overflow(&yourtm.tm_min, &yourtm.tm_sec,
 			SECSPERMIN))
-				return WRONG;
+			goto overflow;
 	}
 	if (normalize_overflow(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR))
-		return WRONG;
+		goto overflow;
 	if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY))
-		return WRONG;
+		goto overflow;
 	y = yourtm.tm_year;
 	if (normalize_overflow32(&y, &yourtm.tm_mon, MONSPERYEAR))
-		return WRONG;
+		goto overflow;
 	/*
 	** Turn y into an actual year number for now.
 	** It is converted back to an offset from TM_YEAR_BASE later.
 	*/
 	if (increment_overflow32(&y, TM_YEAR_BASE))
+		goto overflow;
 		return WRONG;
 	while (yourtm.tm_mday <= 0) {
 		if (increment_overflow32(&y, -1))
 <at>  <at>  -1792,9 +1811,9  <at>  <at> 
 		}
 	}
 	if (increment_overflow32(&y, -TM_YEAR_BASE))
-		return WRONG;
+		goto overflow;
 	if (! (INT_MIN <= y && y <= INT_MAX))
-		return WRONG;
+		goto overflow;
 	yourtm.tm_year = y;
 	if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN)
 		saved_seconds = 0;
 <at>  <at>  -1844,17 +1863,17  <at>  <at> 
 		if (dir != 0) {
 			if (t == lo) {
 				if (t == time_t_max)
-					return WRONG;
+					goto overflow;
 				++t;
 				++lo;
 			} else if (t == hi) {
 				if (t == time_t_min)
-					return WRONG;
+					goto overflow;
 				--t;
 				--hi;
 			}
 			if (lo > hi)
-				return WRONG;
+				goto invalid;
 			if (dir > 0)
 				hi = t;
 			else	lo = t;
 <at>  <at>  -1898,7 +1917,7  <at>  <at> 
 		** gets checked.
 		*/
 		if (sp == NULL)
-			return WRONG;
+			goto invalid;
 		for (i = sp->typecnt - 1; i >= 0; --i) {
 			if (sp->ttis[i].tt_isdst != yourtm.tm_isdst)
 				continue;
 <at>  <at>  -1920,16 +1939,22  <at>  <at> 
 				goto label;
 			}
 		}
-		return WRONG;
+		goto invalid;
 	}
 label:
 	newt = t + saved_seconds;
 	if ((newt < t) != (saved_seconds < 0))
-		return WRONG;
+		overflow;
 	t = newt;
 	if (funcp(sp, &t, offset, tmp))
 		*okayp = true;
 	return t;
+invalid:
+	errno = EINVAL;
+	return WRONG;
+overflow:
+	errno = EOVERFLOW;
+	return WRONG;
 }

 static time_t
 <at>  <at>  -1966,6 +1991,7  <at>  <at> 
 	char				seen[TZ_MAX_TYPES];
 	unsigned char			types[TZ_MAX_TYPES];
 	bool				okay;
+	int				save_errno;

 	if (tmp == NULL) {
 		errno = EINVAL;
 <at>  <at>  -1973,9 +1999,12  <at>  <at> 
 	}
 	if (tmp->tm_isdst > 1)
 		tmp->tm_isdst = 1;
+	save_errno = errno;
 	t = time2(tmp, funcp, sp, offset, &okay);
-	if (okay)
+	if (okay) {
+		errno = save_errno;
 		return t;
+	}
 	if (tmp->tm_isdst < 0)
 #ifdef PCTS
 		/*
 <at>  <at>  -2013,8 +2042,10  <at>  <at> 
 					sp->ttis[samei].tt_gmtoff;
 			tmp->tm_isdst = !tmp->tm_isdst;
 			t = time2(tmp, funcp, sp, offset, &okay);
-			if (okay)
+			if (okay) {
+				errno = save_errno;
 				return t;
+			}
 			tmp->tm_sec -= sp->ttis[otheri].tt_gmtoff -
 					sp->ttis[samei].tt_gmtoff;
 			tmp->tm_isdst = !tmp->tm_isdst;

Marvel, Jim (CPCOE | 16 Oct 17:21 2014
Picon

[tz] Carving shapes

How to determine borders for these new zones?

Two zones are added:

Asia/Chita (split from Asia/Yakutsk, and also with two hours subtracted) and 

Asia/Srednekolymsk (split from Asia/Magadan, but with only one hour subtracted).

thanks

Jim Marvel

 

Paul Eggert | 16 Oct 08:31 2014

[tz] Utah may drop DST

The Utah Governor's Office of Economic Development, pursuant to a bill passed 
last year by the state legislature, polled citizens and held public meetings 
about daylight saving time.  They got more than 27,000 responses, including 
13,000 written comments totaling 574,000 words.  The results:

67% preferred Mountain Standard Time (UTC-7) all year (like Arizona)
18% preferred daylight time (UTC-6) all year, essentially Central Standard Time
15% liked the current spring-forward/fall-back system

The main argument of the majority was convenience.  The tourism and recreation 
industries prefer daylight saving, though, and will lobby against switching to 
MST all year if (as seems likely) an MST bill is introduced in the legislature.

My source:

Davidson L. Something new under the sun: Utah may dump daylight saving time. 
Salt Lake Tribune 2014-10-15 
http://www.sltrib.com/sltrib/politics/58526154-90/daylight-saving-malley-utah.html.csp

Ken Rylander | 14 Oct 10:04 2014
Picon

[tz] Fiji DST Oct 26

Hi Paul,

There might be an issue with the Fiji DST (Pacific/Fiji), predicted to happen on Oct 26, at 3am. It looks like the Fiji government haven't yet decided on whether to have DST this year, or not. And in that case, on what date it will start. There was recently elections here, and it seems like the Fiji government haven't prioritised any decisions around DST.

Taking this into consideration, and also the fact that this future, predicted date was introduced by the TZDB, would it be possible to get a tzdata version, where the DST for 2014 is removed?

Ken Rylander | Solution Development and BI Manager - Digicel Pacific |

Digicel (Fiji) Ltd | P.O.Box 13811, Suva, Fiji | Ground Floor, Kadavu House, Victoria Parade, Suva, Fiji |

Mobile (679) 701 5353 | Fax (679) 331 0201  | ken.rylander <at> digicelgroup.com | www.digicelpacific.com

<!-- /* Font Definitions */ <at> font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-alt:"Lucida Sans Unicode"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;} a:link, span.MsoHyperlink {mso-style-noshow:yes; mso-style-priority:99; color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {mso-style-noshow:yes; mso-style-priority:99; color:purple; mso-themecolor:followedhyperlink; text-decoration:underline; text-underline:single;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} <at> page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.WordSection1 {page:WordSection1;} -->
Paul Eggert | 14 Oct 05:40 2014

[tz] [PROPOSED PATCH] new Zone Pacific/Bougainville

This is for the part of Papua New Guinea that plans to switch from
UTC+10 to UTC+11 on 2014-12-28 at 02:00.  (Thanks to Kiley Walbom
for the heads-up.)
* australasia (Pacific/Bougainville): New zone.
* zone.tab, zone1970.tab: Add entries for it.
* NEWS: Document this.
---
 NEWS         |  6 ++++++
 australasia  | 25 +++++++++++++++++++++++++
 zone.tab     |  3 ++-
 zone1970.tab |  3 ++-
 4 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 69dc2ca..26dcbf6 100644
--- a/NEWS
+++ b/NEWS
 <at>  <at>  -2,6 +2,12  <at>  <at>  News for the tz database

 Unreleased, experimental changes

+  Changes affecting future time stamps
+
+    A new Zone Pacific/Bougainville, for the part of Papua New Guinea
+    that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00.
+    (Thanks to Kiley Walbom for the heads-up.)
+
   Changes affecting past time stamps

     Many time stamps have been corrected for Asia/Ho_Chi_Minh before 1976
diff --git a/australasia b/australasia
index 5ea1f18..c06e62c 100644
--- a/australasia
+++ b/australasia
 <at>  <at>  -519,6 +519,30  <at>  <at>  Zone Pacific/Palau	8:57:56 -	LMT	1901 # Koror
 Zone Pacific/Port_Moresby 9:48:40 -	LMT	1880
 			9:48:32	-	PMMT	1895 # Port Moresby Mean Time
 			10:00	-	PGT	# Papua New Guinea Time
+#
+# From Paul Eggert (2014-10-13):
+# Base the Bougainville entry on the Arawa-Kieta region, which appears to have
+# the most people even though it was devastated in the Bougainville Civil War.
+#
+# Although Shanks gives 1942-03-15 / 1943-11-01 for JST, these dates
+# are apparently rough guesswork from the starts of military campaigns.
+# The World War II entries below are instead based on Arawa-Kieta.
+# The Japanese occupied Kieta in July 1942,
+# according to the Pacific War Online Encyclopedia
+# http://pwencycl.kgbudge.com/B/o/Bougainville.htm
+# and seem to have controlled it until their 1945-08-21 surrender.
+#
+# The Autonomous Region of Bougainville plans to switch from UTC+10 to UTC+11
+# on 2014-12-28 at 02:00.  They call UTC+11 "Bougainville Standard Time";
+# abbreviate this as BST.  See:
+# http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/
+#
+Zone Pacific/Bougainville 10:22:16 -	LMT	1880
+			 9:48:32 -	PMMT	1895
+			10:00	-	PGT	1942 Jul
+			 9:00	-	JST	1945 Aug 21
+			10:00	-	PGT	2014 Dec 28  2:00
+			11:00	-	BST

 # Pitcairn
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 <at>  <at>  -803,6 +827,7  <at>  <at>  Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 #	 10:00	AEST	AEDT	Eastern Australia
 #	 10:00	ChST		Chamorro
 #	 10:30	LHST	LHDT	Lord Howe*
+#	 11:00	BST		Bougainville*
 #	 11:30	NZMT	NZST	New Zealand through 1945
 #	 12:00	NZST	NZDT	New Zealand 1946-present
 #	 12:15	CHAST		Chatham through 1945*
diff --git a/zone.tab b/zone.tab
index 084bb2f..a7373f1 100644
--- a/zone.tab
+++ b/zone.tab
 <at>  <at>  -307,7 +307,8  <at>  <at>  PE	-1203-07703	America/Lima
 PF	-1732-14934	Pacific/Tahiti	Society Islands
 PF	-0900-13930	Pacific/Marquesas	Marquesas Islands
 PF	-2308-13457	Pacific/Gambier	Gambier Islands
-PG	-0930+14710	Pacific/Port_Moresby
+PG	-0930+14710	Pacific/Port_Moresby	most locations
+PG	-0613+15534	Pacific/Bougainville	Bougainville
 PH	+1435+12100	Asia/Manila
 PK	+2452+06703	Asia/Karachi
 PL	+5215+02100	Europe/Warsaw
diff --git a/zone1970.tab b/zone1970.tab
index 57c11f1..e971bc7 100644
--- a/zone1970.tab
+++ b/zone1970.tab
 <at>  <at>  -264,7 +264,8  <at>  <at>  PE	-1203-07703	America/Lima
 PF	-1732-14934	Pacific/Tahiti	Society Islands
 PF	-0900-13930	Pacific/Marquesas	Marquesas Islands
 PF	-2308-13457	Pacific/Gambier	Gambier Islands
-PG	-0930+14710	Pacific/Port_Moresby
+PG	-0930+14710	Pacific/Port_Moresby	most locations
+PG	-0613+15534	Pacific/Bougainville	Bougainville
 PH	+1435+12100	Asia/Manila
 PK	+2452+06703	Asia/Karachi
 PL	+5215+02100	Europe/Warsaw
--

-- 
1.9.3

Christos Zoulas | 7 Oct 22:25 2014

[tz] localtime.c patch

Minor nits.

christos

--- localtime.c.orig	2014-10-07 16:20:32.000000000 -0400
+++ localtime.c	2014-10-07 16:22:47.000000000 -0400
 <at>  <at>  -306,3 +306,3  <at>  <at> 
 	register int			stored;
-	register int			nread;
+	register ssize_t		nread;
 	typedef union {
 <at>  <at>  -934,3 +934,2  <at>  <at> 
 	register bool			load_ok;
-	static struct ttinfo		zttinfo;

 <at>  <at>  -1006,3 +1005,3  <at>  <at> 
 			*/
-			sp->ttis[0] = sp->ttis[1] = zttinfo;
+			memset(sp->ttis, 0, sizeof(sp->ttis));
 			sp->ttis[0].tt_gmtoff = -dstoffset;
 <at>  <at>  -1131,3 +1130,3  <at>  <at> 
 			*/
-			sp->ttis[0] = sp->ttis[1] = zttinfo;
+			memset(sp->ttis, 0, sizeof(sp->ttis));
 			sp->ttis[0].tt_gmtoff = -stdoffset;
 <at>  <at>  -1145,3 +1144,3  <at>  <at> 
 		sp->timecnt = 0;
-		sp->ttis[0] = zttinfo;
+		memset(sp->ttis, 0, sizeof(sp->ttis));
 		sp->ttis[0].tt_gmtoff = -stdoffset;
 <at>  <at>  -2108,3 +2107,2  <at>  <at> 

-	sp = lclptr;
 	i = sp->leapcnt;

Peter Ilieve | 5 Oct 16:48 2014
Picon

[tz] St Andrews meridian in the 17th century

Now that we don’t have to think about a possible future Europe/Glasgow
zone (postings back in August) for several years at least, here’s a
bit of Scottish history to consider instead.

St Andrews, on the Fife coast in the east of Scotland, had a meridian
line set up some 200 years before Greenwich. Here’s a quote from
a press release from the University of St Andrews, who have just
created a memorial to mark this line:

"The 17th Century Scottish astronomer and scientific pioneer
James Gregory laid down a meridian line across the floor of his
lab at St Andrews University in 1673, almost 200 years before the
Greenwich Meridian was established and arbitrarily adopted as the
world’s official prime meridian.

"Now St Andrews has recognised Gregory’s remarkable body of work
with a permanent public memorial – a solid brass line which follows
exactly the line of his meridian and bisects the pavement in
South Street, St Andrews.”

This story was picked up by The Times and the BBC (and probably others
I haven’t seen). As well as the line on the lab floor there was
a sighting mark outside a window and a stone marker on a hill
2.4km away. This still exists and is marked on Ordnance Survey maps.

Some URLs:

The University of St Andrews press release:
<http://www.st-andrews.ac.uk/news/archive/2014/title,250213,en.php>
BBC piece:
<http://www.bbc.co.uk/news/uk-scotland-29474850>
The Times piece (which is behind their paywall):
<http://www.thetimes.co.uk/tto/news/uk/scotland/article4224136.ece>
Map showing St Andrews and Gregory’s Pillar (marked with arrow):
<http://www.streetmap.co.uk/idld.srf?X=350994&Y=715496&A=Y&Z=115&lm=1&ax=350994&ay=714196>

		Peter Ilieve

Paul Eggert | 5 Oct 02:40 2014

[tz] [PROPOSED PATCH] * zdump.c (adjusted_yday): Define only if TM_GMTOFF is not defined.

---
 zdump.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/zdump.c b/zdump.c
index 37a0926..13bbb0e 100644
--- a/zdump.c
+++ b/zdump.c
 <at>  <at>  -851,8 +851,9  <at>  <at>  delta(struct tm * newp, struct tm *oldp)
 	return result;
 }

+#ifndef TM_GMTOFF
 /* Return A->tm_yday, adjusted to compare it fairly to B->tm_yday.
-  Assume A and B differ by at most one year.  */
+   Assume A and B differ by at most one year.  */
 static int
 adjusted_yday(struct tm const *a, struct tm const *b)
 {
 <at>  <at>  -861,6 +862,7  <at>  <at>  adjusted_yday(struct tm const *a, struct tm const *b)
     yday += 365 + isleap_sum(b->tm_year, TM_YEAR_BASE);
   return yday;
 }
+#endif

 /* If A is the broken-down local time and B the broken-down UTC for
    the same instant, return A's UTC offset in seconds, where positive
--

-- 
1.9.1


Gmane