3689 Commits
Author SHA1 Message Date
Paul Eggert 6ea8fa7879 Release tzcode2014i and tzdata2014i.
* NEWS, Makefile (VERSION): Increase to 2014i.
2014i
2014-10-21 22:06:07 -07:00
Paul Eggert 76f0cdaf90 * tz-link.htm: Remove mention of no-longer-distributed USGS data.
Clean up typography slightly.
2014-10-21 21:57:35 -07:00
Paul Eggert 7c3ff10f9e * tz-art.htm: Add Enright play. Fix Dylan title. 2014-10-21 19:06:23 -07:00
Paul Eggert 6ade45f043 * NEWS: Move abbreviation commentary to appropriate section. 2014-10-21 13:55:30 -07:00
Paul Eggert 253d6a8dbb * asia, backzone: Verify Trần 2005 and add sources.
I obtained a copy of Trần Tiến Bình's 2005 book "Lịch Việt Nam:
thế kỷ XX-XXI (1901-2100)", verified that www.thoigian.com.vn's
page is a verbatim quote of a passage in pages 45-50, and added a
list of Trần's sources for his pp 49-50.
2014-10-21 13:53:26 -07:00
Paul Eggert 8f58b53628 Fiji observes DST from 2014-11-02 02:00 to 2015-01-18 03:00.
(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.
2014-10-20 17:31:00 -07:00
Paul Eggert 5119a2c3a3 * localtime.c (zoneinit): Return int errno value instead of bool
and storing into errno.  All uses changed.  This slightly
simplifies the code.
2014-10-18 11:07:54 -07:00
Paul Eggert dd828f759d * northamerica, NEWS: Add NRC Canada link for DST.
(Thanks to Brian Inglis.)

* NEWS: Document this.
2014-10-18 00:54:02 -07:00
Paul Eggert add61671e7 Fix localtime.c undefined behaviors and set errno.
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.
2014-10-18 00:45:29 -07:00
Paul Eggert 8791b19ae9 * northamerica, NEWS: Update NRC Canada URLs. (Thanks to Matt Johnson.) 2014-10-17 12:36:04 -07:00
Paul Eggert d412edc822 * zdump.8: Be more specific about when a year starts. 2014-10-14 23:53:38 -07:00
Tim Parenti a3733a4db3 * NEWS: Adds missing subheading. 2014-10-14 21:43:59 -07:00
Paul Eggert e0c11579ca * australasia (Pacific/Fiji), NEWS: Guess no DST this year.
* newtzset.3: Mention that the Fiji example is obsolete.

(Thanks to Ken Rylander for the heads-up.)
2014-10-14 18:41:12 -07:00
Paul Eggert fd5ac06bf7 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.
2014-10-13 20:43:59 -07:00
Paul Eggert a978cd7ac2 * backzone (Asia/Hanoi): Just say "1954 Oct" for 1954 transition.
See Tim Parenti's comment in:
http://mm.icann.org/pipermail/tz/2014-October/021717.html
2014-10-13 08:48:32 -07:00
Paul Eggert bcb616ca40 * backzone (Asia/Hanoi): New entry.
(Asia/Phnom_Penh, Asia/Vientiane): Update to be consistent.
2014-10-11 11:56:32 -07:00
Paul Eggert 61f21b964f * europe (Europe/Minsk): Change abbreviation from FET to MSK
when Moscow changes it clocks (2014-10-26 01:00 Minsk time).
* NEWS: Document this.
2014-10-09 21:17:03 -07:00
Tim Parenti cb2e095a85 * europe: Add dates for historical use of FET. 2014-10-09 13:18:53 -07:00
Paul Eggert 4d306b3a17 Fix EOVERFLOW-related problems noted by Chistos Zoulas.
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.
2014-10-08 11:03:57 -07:00
Paul Eggert 3bf56b926f Fix some localtime.c problems noted by Christos Zoulas
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.
2014-10-07 21:43:13 -07:00
Paul Eggert 165f61b401 * zdump.c (adjusted_yday): Define only if TM_GMTOFF is not defined. 2014-10-04 17:38:05 -07:00
Paul Eggert 03eafae53a Many corrections to data for Vietnam, 1906-1975.
* 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.
2014-10-04 17:14:56 -07:00
Paul Eggert 6f7ddecfb0 Move two out-of-scope Indochina zones to 'backzone'.
* 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.
2014-10-04 16:54:39 -07:00
Paul Eggert 4cf114ec1a Make 'timezone' and 'altzone' more compatible with 'tzname'.
* 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.
2014-10-03 22:22:50 -07:00
Paul Eggert 651d4deba4 Release tzcode2014h and tzdata2014h.
* NEWS, Makefile (VERSION): Increase to 2014h.
2014h
2014-09-25 19:00:28 -07:00
Paul Eggert 9b045af621 * localtime.c (localtime_tzset): Coalesce two identical flag args.
All callers changed.
2014-09-23 07:36:50 -07:00
Paul Eggert 08ada9f945 * tz-link.htm: Update some links. 2014-09-23 00:50:42 -07:00
Paul Eggert 97e991fc67 * northamerica (America/Jamaica): 1974 sprang forward on Jan. 6,
not Apr. 28.
* NEWS: Document this.
2014-09-22 23:49:31 -07:00
Paul Eggert 95735ffc20 * zdump.8, NEWS: Mention that tm_isdst might not be 0 or 1. 2014-09-21 22:03:34 -07:00
Paul Eggert d6abfde226 Port zdump to localtime that sets tm_isdst greater than 1.
* zdump.c (abbr): Don't assume localtime sets tm_isdst to 1
for daylight saving time; any positive value will do.
2014-09-21 22:00:16 -07:00
Paul Eggert 4d66cda33c * zdump.8, NEWS: Document the gmtoff=N output. 2014-09-21 21:16:39 -07:00
Paul Eggert 40b395e139 Have zdump output gmtoff= even on platforms lacking TM_GMTOFF.
* 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.
2014-09-21 20:54:54 -07:00
Paul Eggert 3d7af33d76 Prefer localtime_rz to gmtime, for speed.
localtime_rz does not need to lock, but gmtime does.
* zdump.c (gmtime_r) [!HAVE_LOCALTIME_R]: New function.
(USE_LOCALTIME_RZ): New macro.  Use it to simplify ifdef usage.
(gmtz): New static var.
(gmtzinit, my_gmtime_r): New functions.
(main): Use them.
2014-09-21 17:12:38 -07:00
Paul Eggert 9f224b2078 port to C11 memory model
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.
2014-09-21 17:12:23 -07:00
Paul Eggert 0eb01e8a0c Fix memory leak if ALL_STATE and multithreaded.
* localtime.c (gmtcheck) [ALL_STATE]: Don't leak memory if two
threads invoke this function nearly simultaneously.
Problem reported by Andy Heninger in:
http://mm.icann.org/pipermail/tz/2014-September/021599.html
* NEWS: Document this.
2014-09-21 17:03:52 -07:00
Paul Eggert 8dd540a1e5 * europe: "BST" also stands for "British Standard Time" (1968-1971). 2014-09-14 23:05:39 -07:00
Paul Eggert 07394c4ada * NEWS, Theory, zdump.8, zic.8: Document that the proleptic Gregorian
calendar is used.  (Thanks to Alan Barrett for the suggestion.)
2014-09-11 00:29:22 -07:00
Paul Eggert 51075b0f5c Minor localtime fixups.
* localtime.c (localsub): Tune slightly.
Don't set tzname unless successful.
(gmtime_r, offtime, timeoff): Simplify.
* NEWS: Document the tzname change.
2014-09-11 00:15:20 -07:00
Paul Eggert 50cafab5d8 Fix 2014g zdump regression on platforms without TM_ZONE.
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.
2014-09-10 23:55:26 -07:00
Paul Eggert 9618efb826 Fix 2014g regression: localtime and mktime weren't setting tzname.
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.
2014-09-10 23:55:14 -07:00
Paul Eggert 2e78bf08dc * zdump.8: Fix documentation of zdump cutoff behavior.
(Thanks to Tim Parenti for reporting the problem.)
2014-09-10 23:05:10 -07:00
Paul Eggert 8973320770 * zdump.8, NEWS: Document zdump cutoff behavior more precisely.
(Thanks to Tim Parenti for reporting the problem.)
2014-09-08 12:26:19 -07:00
Paul Eggert 86677a3e82 * Makefile (check_sorted): Further improve quality of checks.
* NEWS: Document this.
* zone1970.tab: Sort country codes better.
2014-09-06 19:24:32 -07:00
Paul Eggert 20532ffda0 * NEWS, asia, backzone, northamerica: Document fractional GMT offsets
for Chennai, Jakarta, and New York in the 19th century.
2014-09-06 18:41:05 -07:00
Paul Eggert 720111eb8a * Makefile (check_sorted): Fix typo in recent change. 2014-09-06 18:37:10 -07:00
Paul Eggert fef27b6086 * zdump.8, NEWS: Document zdump -c's treatment of years better.
(Problem reported by Arthur David Olson.)
2014-09-06 17:42:00 -07:00
Paul Eggert 765af4585e * Theory: Mention 40-bit time_t. 2014-09-06 16:40:32 -07:00
Paul Eggert 53d5038b3f * zdump.c (main): Fix bug with 'zdump -Vc 1981,1982 Asia/Singapore'
missing the end-of-1981 transition.  Problem reported by Tim Parenti in:
http://mm.icann.org/pipermail/tz/2014-September/021565.html
2014-09-06 16:35:59 -07:00
Paul Eggert 76409ad9c6 Check that supposedly-sorted source files actually are sorted.
* Makefile (check_sorted): New rule.
(check, .PHONY): Add it.
* backzone: Sort.
2014-09-06 15:11:40 -07:00
Paul Eggert 3392d32c3a Move out-of-scope UTC+2 African zones to 'backzone'.
* 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.
2014-09-06 14:57:20 -07:00