* asia (Asia/Bahrain): Now links to Asia/Qatar.
(Asia/Kuwait, Asia/Aden): Now links to Asia/Riyadh.
(Asia/Muscat): Now links to Asia/Dubai.
* backzone: Move the old data here.
* checktab.awk (tztab): Remove special cases for these zones.
* NEWS: Document the above.
* europe (Iceland, Atlantic/Reykjavik):
Correct entries for 1939, 1921, 1919, and 1837-1907.
Coalesce some other entries, for simplicity.
* NEWS: Document this.
When using gawk and Posix TZ in tzselect, this warning is shown:
awk: cmd. line:1: warning: escape sequence `\.' treated as plain `.'
gawk treats '\.' as '.'
mawk treats '\.' as '\.'
both treat '\\.' as '\\.'
The 2nd and 3rd are corrrect for 'Mm.w.d'.
Test:
gawk 'BEGIN{ date = "\."; print date }'
gawk 'BEGIN{ date = "\\."; print date }'
versus:
mawk 'BEGIN{ date = "\."; print date }'
mawk 'BEGIN{ date = "\\."; print date }'
* tzselect.ksh (date): Fix bug that broke POSIX TZ checking with gawk.
* NEWS: Document this.
Problem reported by Stephen Colebourne in:
http://mm.icann.org/pipermail/tz/2014-November/021888.html
* backward (Africa/Asmera): Link to Africa/Nairobi,
not to Africa/Asmara.
* backzone (Africa/Asmera): New link, to override 'backward'.
* NEWS: Document fixes.
* localtime.c (settzname): Move scrubbing into ...
(scrub_abbrs): ... this new function.
(zoneinit): Use it here, rather than in settzname.
* NEWS: Document this.
* africa (Africa/Addis_Ababa, Africa/Asmara, Africa/Dar_es_Salaam)
(Africa/Djibouti, Africa/Kampala, Africa/Mogadishu, Indian/Antananarivo)
(Indian/Comoro, Indian/Mayotte):
Change these from zones to links to Africa/Nairobi.
* backzone: Move the old data here.
* checktab.awk (tztab): Remove special cases for these zones.
* NEWS: Document the above.
* africa, asia, australasia, backzone, europe, northamerica:
* southamerica, tz-link.htm: Be less enthusiastic about Shanks.
* tz-link.htm: Be clearer about UT vs UTC.
* NEWS: Document this.
(Thanks to Sanghyuk Jung.)
* asia (ROK): Add entries for 1948-1959 and correct entries
for 1987-1988.
(Asia/Seoul): Correct entries through 1962.
(Asia/Pyongyang): Guess no change since World War II.
* NEWS: Document this.
(Thanks to Ken Rylander for the heads-up.)
* australasia (Fiji): Assume Nov Sun>=1 2:00 to Jan Sun>=18 3:00
from here on out.
* newtzset.3: Adjust Fiji example to match current assumptions.
* NEWS: Document this.
Christos Zoulas reported a crash due to a tzsetlcl failure to
initialize data in some places, and requested that errno be set
when time functions fail; see:
http://mm.icann.org/pipermail/tz/2014-October/021754.html
While fixing this in a different way, I noticed and fixed another
instance of undefined behavior when read returns a too-small value.
* NEWS: Document this.
* localtime.c (union input_buffer): Rename from u_t.
(union input_buffer, union local_storage):
Move to top level so that two functions can use them.
(tzloadbody): New function, with most of the body of the old tzload.
Check for short reads that leave uninitialized buffers behind.
Define a new constant TZHEADSIZE for this, and use it to simplify
other code that already uses the concept.
(tzload): Use it. This removes the need for gotos. Return an errno
value; all callers changed.
(zoneinit): Return bool, not struct state *. Assume SP is nonnull.
All callers changed.
(zoneinit, tzalloc): Set errno on failure.
(tzsetlcl): Don't crash if zoneinit fails.
* private.h (ENAMETOOLONG): Define if not already defined.
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.
See: http://mm.icann.org/pipermail/tz/2014-October/021692.html
* asctime.c (asctime_r): Remove now-unnecessary EOVERFLOW ifdef.
* localtime.c (timesub): Set errno to EOVERFLOW on overflow.
POSIX requires this.
(ctime, ctime_r): Return NULL instead of having undefined behavior
when the time stamp is out of struct tm range. NetBSD does this,
the standards allow it, and it's nicer for users.
* private.h (EOVERFLOW): Default to EINVAL on ancient hosts that lack it.
* NEWS: Document this.
in: http://mm.icann.org/pipermail/tz/2014-October/021684.html
* localtime.c (tzload): Use ssize_t, not int. Redo comparison to
avoid the need for an ssize_t value less than -1, which POSIX does
not guarantee. Use memmove so that we needn't worry about an
ssize_t index.
(tzparse): Remove static always-zero var. Initialized fields
to zero by hand instead.
(zoneinit): Initialized more fields, to avoid undefined behavior
in tzalloc.
(leapcorr): Fix bug, a stray initialization of a local variable.
* Makefile: Add comment about ssize_t.
* NEWS: Document the above.
* asia (Asia/Ho_Chi_Minh):
Rewrite the data from 1906 through 1975, using new information
from Trần Tiến Bình's book. (Thanks to Trần Ngọc Quân.)
New abbreviation IDT for UT+8 in Indochina.
* checktab.awk (tztab): Remove special cases for this zone.
* zone1970.tab: Add Asia/Ho_Chi_Minh, and add Asia/Bangkok commentary.
* NEWS: Document this.
* asia (Asia/Phnom_Penh, Asia/Vientiane):
Change these from zones to links to Asia/Bangkok.
* backzone: Move the old data here.
* checktab.awk (tztab): Remove special cases for these zones.
* NEWS: Document the above.
* localtime.c (localsub): Don't bother updating 'tzname' again
when localtime is GMT, as tzset's value should be fine. When
updating 'tzname', also update 'timezone' and 'altzone'
consistently, on platforms that define the latter two vars.
* NEWS: Document this.
* zdump.c (adjusted_yday, gmtoff): New functions.
(show): Use new function gmtoff to output gmtoff= even on
platforms that do not define TM_GMTOFF.
* NEWS: Document this.
We don't know of any problems with the previous code on practical
platforms, but it's safer to be portable.
Problem reported by Andy Heninger in:
http://mm.icann.org/pipermail/tz/2014-September/021599.html
* localtime.c (VOLATILE): Remove. All uses removed.
(gmtcheck): Don't access gmt_is_set until we have the lock.
This may be significantly slower, but it's safer.
(localtime_tzset): Likewise. This change isn't significantly
slower, though; it's more of a refactoring.
* NEWS: Document this.
Problem reported by Tim Parenti in:
http://mm.icann.org/pipermail/tz/2014-September/021585.html
* zdump.c (localtime_r, localtime_rz) [!TM_ZONE]:
Just call 'localtime', since this can set tzname in a
timestamp-dependent way, which is better for zdump.
* NEWS: Document this.
In 2014g, localtime and mktime set tzname[0] and tzname[1] as if by
tzset, regardless of the requested time stamp. In 2014f and earlier,
localtime and mktime then set tzname[0] or tzname[1] to a time zone
appropriate for the time stamp in question.
Although both behaviors conform to POSIX, the 2014f behavior is
better because it lets a single-threaded application discover the
time zone abbreviation appropriate for the just-queried time stamp
even on platforms that lack TM_ZONE. The 2014f-and-earlier zdump
relies on the 2014f library behavior on these platforms.
Problem reported by Tim Parenti in:
http://mm.icann.org/pipermail/tz/2014-September/021585.html
* localtime.c (localsub): Treat a nonzero offset value
as a request to set tzname on success. All callers changed.
(localtime_rz, mktime_z): Define only if NETBSD_INSPIRED,
as they're no longer needed otherwise.
(localtime_tzset): Invert sense of third arg from SKIP_TZSET
to SETTZ. New arg SETNAME. All callers changed.
(localtime): Request tzname to be set on success.
(mktime_tzname): New function, with most of the previous
contents of mktime_z.
(mktime_z, mktime): Use it.
* NEWS: Document the above.
* africa (Africa/Blantyre, Africa/Bujumbura, Africa/Gaborone)
(Africa/Harare, Africa/Kigali, Africa/Lubumbashi, Africa/Lusaka):
Change these from zones to links to Africa/Maputo.
(Africa/Maseru, Africa/Mbabane):
Change these from zones to links to Africa/Johannesburg.
* backzone: Move the old data here.
* checktab.awk (tztab): Remove special cases for these zones.
* NEWS: Document the above.