Commit Graph
100 Commits
Author SHA1 Message Date
Paul Eggert b2290be9d6 Prefer memcpy to strncpy when either will do.
* localtime.c (tzparse)
* zic.c (doabbr):
Use memcpy, as only nonzero bytes are being copied.
* zic.c (doabbr): Remove unnecessary test.
2014-08-25 08:19:48 -07:00
Paul Eggert 234c9c3b13 Fix unlikely buffer overrun when setting date across network.
* date.c (netsettime) [TSP_SETDATE]: Don't assume gethostname
returns a null-terminated string.
2014-08-25 08:19:48 -07:00
Paul Eggert 7eb7c7349c Use bool for boolean.
The tz source code predates C99 and so used int, 0 and 1 for boolean,
but nowadays bool is available and makes the code clearer.
Include backwards-compatibility definitions for pre-C99 platforms,
and don't go beyond what the backwards-compatibility defintions support.
* date.c (main, reset, sametm, convert, checkfinal, iffy, netsettime):
* localtime.c (struct ttinfo, struct state, gmt_is_set)
(differ_by_repeat, tzload, typesequiv, getoffset, transtime)
(tzparse, gmtload, tzsetwall_unlocked, tzset_unlocked, gmtcheck)
(localtime_tzset, timesub, increment_overflow)
(increment_overflow32, increment_overflow_time)
(normalize_overflow, normalize_overflow32, time2sub, time2)
(time1):
* strftime.c (_fmt, _yconv, _loc):
* zdump.c (warned, errout, is_alpha, my_localtime, abbrok)
(main, hunt, show):
* zic.c (struct rule, errors, warnings, leapseen, noise)
(leap_types, ttisstds, ttisgmts, error, warning, main, dolink)
(associate, infile, gethms, inzone, inzcont, inzsub, inleap)
(rulesub, is32, writezone, doabbr, stringoffset, stringrule)
(stringzone, outzone, addtype, leapadd, yearistype, is_space)
(is_alpha, ciequal, itsabbr, mkdirs):
Use bool for boolean.
* localtime.c (tzload, tzparse):
* zic.c (stringoffset, mkdirs):
Return true for success and false for failure instead of 0 and -1.
All callers changed.
* private.h, zdump.c (TRUE, FALSE): Remove, replacing by ...
(true, false, bool): Define by <stdbool.h> if C99 or later,
by macros otherwise.
* tzfile.h: Remove mention of TRUE and FALSE from commentary.
* zic.c (addtype): Remove now-unnecessary checks that a bool is a
boolean.
2014-08-25 08:19:48 -07:00
Paul Eggert 96eff14f85 Simplify configuration of TM_GMTOFF and TM_ZONE.
* private.h, zdump.c (_GNU_SOURCE): New macro.
(TM_GMTOFF) [!NO_TM_GMTOFF]:
(TM_ZONE) [!NO_TM_ZONE]: Guess definition if not already defined.
* Makefile, NEWS: Document the above.
2014-08-25 08:19:48 -07:00
Paul Eggert 2f7599d358 Port to GCC 3.4.6, which does not define __LONG_LONG_MIN__ on Irix.
* private.h (INT_FAST64_MIN, INTMAX_MIN): Don't use
__LONG_LONG_MIN__ when defining backwards-compatibility workaround.
2014-08-25 08:19:48 -07:00
Paul Eggert 1f5348d829 Minor library fixes for signed integer overflow.
* localtime.c (localsub, time2sub): Don't assume that signed
integer overflow wraps around.
2014-08-25 08:19:48 -07:00
Paul Eggert 13a277175c Fix some bugs and potential crashes with bad data in zone files.
* localtime.c (tzload): Avoid undefined behavior on integer overflow
when reading a file containing integers out of machine range.
Simplify some of the existing overflow checking.
Handle out-of-range leap-second transitions similarly to the
way we now handle out-of-range ordinary transitions.
* NEWS: Document this and other recent fixes.
2014-08-25 08:19:48 -07:00
Paul Eggert 10ac30643e * Makefile (check_time_t_alternatives): Pass REDO to submake. 2014-08-25 08:19:48 -07:00
Paul Eggert 6292f17b4f * localtime.c (tzload): Reject files with out-of-order transitions. 2014-08-25 08:19:48 -07:00
Paul Eggert aaebb8e386 Port to platforms with leap seconds and unsigned time_t.
* localtime.c (tzload): On platforms where time_t is unsigned,
don't mishandle zones that contain leap seconds but no ordinary
transitions after 1970.  This problem can be reproduced by running
'zdump -v right/Asia/Dubai' on a platform where time_t is an
unsigned 32-bit integer.
2014-08-25 08:19:48 -07:00
Paul Eggert 35bcc1d40a * NEWS: Fix sign typo in Turks & Caicos news. (Thanks to Matt Johnson.) 2014-08-25 08:19:48 -07:00
Paul Eggert 23fe9ad77a Simplify new Turks & Caicos rules.
* northamerica (TC): Remove, as it's now a duplicate of the US rules.
Remove obsolescent comment about this.
(America/Grand_Turk): Use US rather than TC.
2014-08-25 08:19:48 -07:00
Paul Eggert d7c4d73ba3 * northamerica (TC, America/Grand_Turk): Switch from EST/EDT to AST.
* NEWS: Document this.
2014-08-25 08:19:48 -07:00
Paul Eggert 253d158c17 zic: check more consistently for I/O errors and improve diagnostics
* zic.c (warnings): New static var.
(warning): Set it here.
(size_product, growalloc, main): Translate diagnostic.
(verror): Don't increment errors here.
(error): Set it here.
(close_file): New function.
(usage, dolink, infile, writezone): Use it.
(usage): Fit diagnostic in output lines better.
(main): Prefer 'return X;' to 'exit(X);'.
(main, infile, mkdirs): Use 'warning' for warnings.
Check for stderr output error.
(dolink, mkdirs): Don't assume gettext preserves errno.
2014-08-25 08:19:48 -07:00
Paul Eggert 4ad336d57a zdump: check more consistently for output errors
* zdump.c: Include <errno.h>.
(errout): New static var.
(my_localtime) [!TYPECHECK]
(abbrok): Set it.
(close_file): New function.
(usage, main): Use it.
(main): Prefer 'return X;' to 'exit(X);'.
Check for stderr output error.
2014-08-25 08:19:48 -07:00
Paul Eggert 5bfa967c17 Avoid (void) before calls.
Although the cast to void in usage like '(void) printf ("Hello")'
may have been helpful decades ago when Lint Was Your Friend,
nowadays such casts are not helpful.  The tz code is currently not
consistent about this: sometimes the casts are present, and
sometimes absent.  As they make the code harder to read, let's
remove them.
* asctime.c, date.c, ialloc.c, localtime.c, strftime.c, zdump.c, zic.c:
Don't cast calls to 'void'.
2014-08-25 08:19:47 -07:00
Paul Eggert 11f5ff1129 * Makefile (strftime.o): Depend on private.h. 2014-08-25 08:19:47 -07:00
Paul Eggert fe7e48bcf5 * localtime.c (tzsetwall): Define only if STD_INSPIRED.
This removes lint in the !STD_INSPIRED case, as this function
is now unused in that case.
2014-08-25 08:19:47 -07:00
Paul Eggert 64399fc596 Make the library thread-safe if THREAD_SAFE is defined.
* localtime.c [THREAD_SAFE]: Include pthread.h.
(VOLATILE): New macro.
(locallock) [THREAD_SAFE]: New static var.
(lock, unlock): New functions.
(lcl_is_set, gmt_is_set): Now VOLATILE.
(tzsetwall): Move cleaned-up guts to new function tzsetwall_unlocked,
for which this is now merely a locking wrapper.
(tzset): Similarly, for new function tzset_unlocked.
(localsub): Don't set tzname here; that's not thread-safe.
This change can lose information on hosts without TM_ZONE,
but there is no reliable way to fix that in a thread-safe way.
(localtime_tzset): New function, which does proper locking.
(localtime, localtime_r): Use it.
(gmtsub): Do not worry about initializing gmtptr, as that's now
the caller's responsibility.
(gmtime): Reimplement in terms of gmtime_r.
(timegm): Reimplement in terms of timeoff.
(gmtime_r, offtime, mktime, timeoff, time2posix, posix2time):
Lock at start and unlock at end.
* Makefile, NEWS: Document this.
2014-08-25 08:19:47 -07:00
Paul Eggert 4d86b313aa * private.h (timegm, timelocal) [time_tz]: Define replacements.
Needed on Ubuntu 14.04 when compiling with -D_GNU_SOURCE -Dtime_tz=....
2014-08-25 08:19:47 -07:00
Paul Eggert aedcce3e83 Remove lint when debugging by compiling with -Dtime_tz='whatever'.
* localtime.c (LOCALTIME_IMPLEMENTATION): New macro.
(time) [time_tz]: Move here from private.h, and make external.
* private.h (sys_time) [time_tz]: Define only if
LOCALTIME_IMPLEMENTATION, so that the code doesn't define an unused
static function sys_time that the compiler might complain about.
(time) [time_tz]: Move to localtime.c.
* NEWS: Document this.
2014-08-25 08:19:47 -07:00
Paul Eggert 6bc7f54afa * date.c, localtime.c, zdump.c: Simplify prototypes for static functions
by removing prototypes that aren't needed, and by removing names
of arguments.  This will make future changes simpler and easier to
follow.
* NEWS: Document this.
2014-08-25 08:19:47 -07:00
Paul Eggert a253a3f97e Port to GCC 4.1.3 + NetBSD 5.1.
* private.h (INT_FAST32_MAX, INT_FAST32_MIN):
Define if not already defined, since localtime.c uses them.
2014-08-25 08:19:47 -07:00
Paul Eggert ad6d5fe9e6 Port to NetBSD when using GCC_DEBUG_FLAGS or defining time_tz.
* private.h (offtime, posix2time, time2posix, timeoff) [time_tz]:
Define tz_* replacements for these functions too.
(asctime_r): Move to after time_tz definitions, to keep like
declarations together.
(tzsetwall) [STD_INSPIRED]: Declare if not defined.
(offtime, timeoff, time2posix, posix2time) [STD_INSPIRED]:
Declare if not defined, or if time_tz is defined.
* NEWS: Document this.
2014-08-25 08:19:47 -07:00
Paul Eggert a95a6ddad1 date: port to Ubuntu 14.04 with -DHAVE_UTMPX_H=1
* date.c (WTMPX_FILE): Define to _PATH_WTMPX if not already defined
and if _PATH_WTMPX is defined.
(reset): Do not use WTMPX_FILE if it is not defined.
* NEWS: Document this.
2014-08-25 08:19:47 -07:00
Paul Eggert c3800e77d6 * backzone: Explain Zone columns. 2014-08-16 22:48:03 -07:00
Paul Eggert 0a5fcf8d0d * asia, NEWS: Update Philippines commentary. 2014-08-14 13:32:53 -07:00
Paul Eggert 7217d26487 * backzone: Fix misspelling (Thanks to Michael Deckers). 2014-08-13 11:46:39 -07:00
Paul Eggert 0f4a8f01fc * CONTRIBUTING: Clarify how to repeat the git workflow.
* NEWS: Thanks.
2014-08-13 08:02:56 -07:00
Paul Eggert 198708147f Reword so that it does not matter whether the word "data" is plural. 2014-08-12 22:20:23 -07:00
Paul Eggert ad420e19ef * time2posix.3, tzfile.5: Use ASCII double-quote only for C strings. 2014-08-12 19:00:04 -07:00
Paul Eggert 11be44dce3 The word "data" is plural. 2014-08-12 18:03:14 -07:00
Paul Eggert 94f941ebd1 Move out-of-scope UTC+1 African zones to 'backzone'.
This illustrates how 'backzone' can be used to migrate
out-of-scope data out of the database proper.
* africa (Africa/Luanda, Africa/Porto-Novo, Africa/Douala, Africa/Bangui)
(Africa/Kinshasa, Africa/Brazzaville, Africa/Malabo, Africa/Libreville)
(Africa/Niamey): Change these from zones to links (to Africa/Lagos).
Move their old data from here ...
* backzone: ... to here.
* checktab.awk (tztab): Remove special cases for these zones.
* NEWS: Document the above.
2014-08-12 17:38:43 -07:00
Paul Eggert ac5bf48519 New data file 'backzone' for out-of-scope and/or poorly-sourced data.
* backzone: New file.
* Makefile (DATA): Add backzone.
(check_character_set): Check it.
(posix_packrat): New rule.
(.PHONY): Add it.
* NEWS: Document the above.
2014-08-12 17:38:35 -07:00
Paul Eggert e107ce8107 * Makefile (.PHONY): Add check_white_space. 2014-08-12 11:30:30 -07:00
Paul Eggert 3b4c54b5b7 * Makefile (check_character_set): Check CONTRIBUTING like README. 2014-08-12 01:12:34 -07:00
Paul Eggert bc9b5b8914 Distribute Theory as part of the tzdata tarball too.
(Suggested by Alan Barrett.)
* Makefile (COMMON): Move Theory here ...
(DOCS): From here.
* NEWS: Document this.
2014-08-12 01:10:09 -07:00
Paul Eggert 319a80ff38 Fix misspelling in previous patch. 2014-08-11 18:46:05 -07:00
Paul Eggert 62711791c3 tzselect: improve heuristic in Africa
Add the product of the longitude difference and the cosine of the
latitude farther from the equator to the distance measure.  This
works better for the Congolese test case noted by Alan Barrett in:
http://mm.icann.org/pipermail/tz/2014-July/021229.html
The new heuristic is not perfect, but no heuristic is.
* tzselect.ksh (abs, min): New functions
(convert_coord): Rename local to avoid name clash.
(gcdist): Rename from dist.
(pardist, dist): New functions.
* NEWS: Document this.
2014-08-11 18:41:32 -07:00
Paul Eggert 67d9b6ac6b * tzselect.ksh: Fix typo in implementation of undocumented -t option. 2014-08-11 17:13:25 -07:00
Paul Eggert ac652d59bb * CONTRIBUTING: New file.
* Makefile (COMMON): Add it.
* README, NEWS, Theory, africa, asia, australasia, europe:
* northamerica, southamerica: Mention it.
2014-08-11 16:03:52 -07:00
Paul Eggert 3405f9c2fb * tz-link.htm, NEWS: Mention HP-UX (and Windows in another place). 2014-08-11 15:20:17 -07:00
Paul Eggert 63ce01cfa8 * europe: Fix some broken British URLs. (Thanks to Lester Caine.)
* NEWS: Document this.
2014-08-11 13:01:24 -07:00
Paul Eggert f02ca7c6ef Shift the load a little between the two tarballs.
(Thanks to Alan Barrett for the suggestion.)
* Makefile (SOURCES): Move workman.sh here, from $(MISC).
(COMMON): Move NEWS here, from $(DOCS).
(tzdata$(VERSION).tar.gz): Move $(MISC) here, from
tzcode$(VERSION).tar.gz.
* NEWS: Document the above.
2014-08-11 12:32:48 -07:00
Paul Eggert 0512625db7 Improve checks for white space.
* Makefile (check_white_space): Rename from check_tabs; all uses
changed.  Also check for trailing white space and for oddball
ASCII white space characters.
2014-08-11 11:53:14 -07:00
Paul Eggert bdd2d3331b * tz-link.htm: Consolidate and tighten up Windows description.
* NEWS: Mention Windows-related doc changes.
2014-08-11 11:53:06 -07:00
Paul Eggert 115b6002d8 Adjust pre-1912 Portuguese transitions in the light of the 1911 decree.
(Thanks to Stephen Colebourne for a heads-up about the decree.)
* africa (Africa/Luanda, Africa/Bissau):
Change transition date to 1912-01-01.
(Atlantic/Cape_Verde, Africa/Maputo):
Add commentary about the switch.
* asia (Asia/Kolkata): Add commentary about Portuguese India.
* europe (Europe/Lisbon): Change Lisbon Mean Time from -0:36:32
to -0:36:45 (rounded from -0:36:44.68).
(Atlantic/Azores, Atlantic/Madeira):
Change transition date to 1912-01-01.
* NEWS: Document the above.
2014-08-11 00:28:13 -07:00
Paul Eggert 66e421de78 * northamerica: Remove no-longer-working mccsc.edu link.
(Thanks to Nathan Stratton Treadway.)
2014-08-10 15:28:45 -07:00
Paul Eggert 0e7d85ca8d * northamerica: Use a better (and active) web page for Indiana map.
(Thanks to Nathan Stratton Treadway for reporting the problem.)
2014-08-10 11:11:01 -07:00
Paul Eggert f2fd32be74 Don't put spaces before tabs.
* Makefile (check_tabs): New rule.
(check): Use it.
Also, fix all other files to not have spaces before tabs.
2014-08-09 17:52:45 -07:00
Paul Eggert 62060419e3 Minor spelling, accent, and spacing fixes.
In particular, this patch is makes the commentary more systematic
about preferring "time zone" to "timezone" except when quoting someone
else or when talking about code that uses "timezone".
2014-08-09 14:15:12 -07:00
Paul Eggert b7a38560a5 Don't put leapseconds.awk in tzdata tarball.
This harmless bug was introduced in release 2014f, which distributed
leapseconds.awk in both the code and the data tarballs.
It's code, so it should be in the code tarball.
* Makefile (DATA): Omit leapseconds.awk.
(check_character_set): Omit redundant check of $(LEAP_DEPS).
2014-08-09 12:46:44 -07:00
Paul Eggert 17e3e1fd3e A few minor spelling fixes.
Also, remove a stray email address that leaked through our
address-removal pass a while ago.
2014-08-09 01:22:55 -07:00
Paul Eggert 3c0c83726c Adjust pre-1926 Russian UTC offsets as per Byalokoz 1919.
(Thanks to Vladimir Karpinsky.)
* asia (Asia/Tbilisi, Asia/Samarkand):
* europe (Europe/Riga, Europe/Samara, Asia/Yekaterinburg, Asia/Omsk)
(Asia/Krasnoyarsk, Asia/Irkutsk, Asia/Yakutsk, Asia/Vladivostok):
Match Byalokoz 1919 better.
* NEWS: Document the above.
2014-08-08 00:54:55 -07:00
Paul Eggert da8d4338f2 Minor spelling, accent, or English fixes. 2014-08-06 22:51:12 -07:00
Paul Eggert 17be956450 Release tzcode2014f and tzdata2014f.
* NEWS, Makefile (VERSION): Increase to 2014f.
2014-08-05 17:46:53 -07:00
Paul Eggert 11c22e9205 * tz-link.htm: Mention Go. Add URL for Fortran. Fix tziCal license.
Update some other URLs and text in minor ways.
2014-08-05 17:41:14 -07:00
Paul Eggert 1c5a4059a7 * asia (Asia/Riyadh): Use modern spelling for Jeddah in comment. 2014-08-05 08:48:32 -07:00
Paul Eggert 4fa17743a2 * NEWS: Also mention Africa/Timbuktu. (Thanks to Stephen Colebourne.) 2014-08-02 18:32:57 -07:00
Paul Eggert a457c170da Revert almost all the zone-to-link changes, keeping only west Africa.
This should better address concerns about large-scale changes.
We can do the rest of these changes later, as they're not urgent.
* backward (Africa/Asmera, Asia/Saigon): Restore old links.
* checktab.awk (tztab): Handle zones that should probably be
turned into links some day.
* africa (Africa/Luanda, Africa/Porto-Novo, Africa/Gaborone)
(Africa/Bujumbura, Africa/Douala, Africa/Bangui, Indian/Comoro)
(Africa/Kinshasa, Africa/Lubumbashi, Africa/Brazzaville)
(Africa/Djibouti, Africa/Malabo, Africa/Asmara, Africa/Addis_Ababa)
(Africa/Libreville, Africa/Maseru, Indian/Antananarivo)
(Africa/Blantyre, Indian/Mayotte, Africa/Niamey, Africa/Kigali)
(Africa/Mogadishu, Africa/Mbabane, Africa/Dar_es_Salaam)
(Africa/Kampala, Africa/Lusaka, Africa/Harare):
* asia (Asia/Bahrain, Asia/Phnom_Penh, Asia/Kuwait)
(Asia/Vientiane, Asia/Muscat, Asia/Ho_Chi_Minh, Asia/Aden):
* australasia (Pacific/Saipan, Pacific/Midway):
* northamerica, southamerica (America/Antigua, America/Cayman):
New zones, restoring 2014e data.  Corresponding links removed.
* NEWS: Document the above.
2014-07-31 21:28:12 -07:00
Paul Eggert 183750fb0e * NEWS, africa, australasia: Minor commentary fixes.
Some of these are from Tim Parenti's proposed patches in:
http://mm.icann.org/pipermail/tz/2014-July/021265.html
2014-07-31 21:02:21 -07:00
Paul Eggert 4c73ed617f Rename time.tab to zone1970.tab.
* Makefile (ZONETABLES): Rename from TIMETABLES.  All uses changed.
* zone1970.tab: Rename from time.tab.  All uses changed.
2014-07-31 15:20:45 -07:00
Paul Eggert 87163d184d The Russian change for 2014-10-26 is official.
(Thanks to Alexander Krivenyshev.)
* europe, time.tab, zone.tab, NEWS (Asia/Chita, Asia/Srednekolymsk):
New zones.  These were formerly commented out.
2014-07-22 20:54:19 -07:00
Paul Eggert b7816e7306 * tzselect.ksh, NEWS: Port to non-Bash shell that has 'select'.
(Thanks to Alan Barrett.)
2014-07-22 20:18:49 -07:00
Paul Eggert f210b6706d * tzselect.8: Fix formatting glitch by creating NOTES section. 2014-07-22 19:50:32 -07:00
Paul Eggert 13454dc50c * Makefile (TZCOBJS), NEWS: Remove localtime.o, asctime.o.
(Thanks to John Cochran.)
2014-07-19 19:19:48 -07:00
Paul Eggert f107634953 * checktab.awk: Fix typo that prevented catching inks in 'time.tab'.
Also, hoist some code out of a loop.
2014-07-19 15:44:39 -07:00
Paul Eggert d46ab6e5e9 * europe: Fix spelling in comment. (Thanks to Christos Zoulas.) 2014-07-19 07:32:56 -07:00
Paul Eggert ec7a539e26 * europe, NEWS: Give proper credit to George Vernon Hudson
as the inventor of DST.
2014-07-19 01:19:40 -07:00
Paul Eggert 5ddc47fe41 New file time.tab, superseding zone.tab
It allows multiple country codes per zone.  Switch code and data to
use the new format, along with the recently-added Crozet Islands entry.
The old zone.tab file is still installed but is deprecated.
The new file uses UTF-8; add commentary saying that iso3166.tab is
planned to change to UTF-8.
* Theory, tzselect.8 (FILES): zone.tab -> time.tab.
* africa (Indian/Alfred_Faure): Remove link.
* antarctica: Mention Possession Island in comments.
* checktab.awk: Add support for checking time.tab.
* iso3166.tab: Mention planned switch to UTF-8.
Update ISO 3166-1 Newsletter from VI-15 to VI-16.
* time.tab: New file.
* tzselect.ksh (zonetabtype): New variable.
Add undocumented -t option, meant for developer testing.
(TZ_ZONE_TABLE): Use zonetabtype.
(output_distances, countries, regions, TZ): Support time.tab format.
(quoted_continents, distance_table, countries, regions)
(TZ, TZ_for_date): Quote shell strings more carefully.
* zone.tab: Refer to time.tab for detailed comments about format.
(Indian/Alfred_Faure): Remove.
* Makefile (TIMETABLES): New macro.
(TABDATA, install, check_tables): Use it.
(check_character_set, check_tables): Check time.tab too.
(check_time_t_alternatives): Use time.tab, not zone.tab.
* NEWS: Document the above.
2014-07-18 13:31:54 -07:00
Paul Eggert d690cb7feb * zone.tab: Reorder to put Pacific times together. 2014-07-18 01:33:34 -07:00
Paul Eggert 717ed49e71 Be a bit more consistent about Metlakatla and Resolute abbr and comments.
* northamerica (America/Metlakatla): Use the more-common "PST"
rather than our invented "MeST" for the abbreviation.  Our source
called it "Pacific Time", as did a contemporaneous news report,
and I couldn't find contemporaneous use of "MeST" or of
"Metlakatla Time".  Cite the news report in the commentary,
and quote some Juneau graffiti.
* zone.tab (America/Resolute): Call it Central Time, not Central
Standard Time, since it observes DST now.
(America/Metlakatla): Call it Pacific Standard Time, not
Metlakatla Time.  Mention that it's in Alaska.
* NEWS: Document the above.
2014-07-18 00:40:37 -07:00
Paul Eggert 66cc7f5d73 * tz-link.htm, NEWS: Mention the latlong package.
(Thanks to a heads-up from Dirkjan Ochtman.)
2014-07-15 22:52:10 -07:00
Paul Eggert f1ddf32f05 Revert some zone-to-link changes and add some more; plus related fixes.
Revert zone-to-link changes that changed current time zone
abbreviations.  Add a few more changes, for more consistency.
Make several other fixes discovered while researching this.
* africa (Africa/Accra, Antarctica/Syowa):
* asia (Pacific/Palau):
* australasia (Pacific/Funafuti, Pacific/Majuro, Pacific/Wake)
(Pacific/Wallis, Antarctica/DumontDUrville, Pacific/Chuuk)
(Pacific/Pohnpei):
* northamerica (Pacific/Tahiti):
Remove links, as they are now zones again.
* africa (Africa/Accra, Africa/Maputo):
* antarctica (Antarctica/DumontDUrville, Antarctica/Syowa):
* australasia (Pacific/Tahiti, Pacific/Majuro, Pacific/Chuuk)
(Pacific/Pohnpei, Pacific/Palau, Pacific/Funafuti, Pacific/Wake)
(Pacific/Wallis):
Restore zone.
* africa (Africa/Accra): Assume DST starting in 1920, as per Scott
Keltie & Epstein 1920.
* asia (Asia/Bahrain, Asia/Phnom_Penh, Asia/Kuwait, Asia/Vientiane)
(Asia/Muscat, Asia/Ho_Chi_Minh, Asia/Aden):
* northamerica (America/Antigua, America/Cayman):
Change from zone to link, as these are also closely related.
* africa (Africa/Blantyre, Africa/Bujumbura, Africa/Gaborone)
(Africa/Harare, Africa/Kigali, Africa/Lubumbashi, Africa/Lusaka):
Now links to Africa/Maputo, not Africa/Johannesburg.
* asia (Asia/Riyadh): Change standard-time transition from 1950
to 1947-03-14.  Add commentary citing Hunt 1961 and CAB 1946.
* australasia (Pacific/Chatham): Assume NZST - 45 min. before 1946.
Add commentary about this.
(Pacific/Pago_Pago): UT-11 from 1911 to 1950.
(WS, Pacific/Apia): Use NZ-style abbreviations.
Switch to "WSST" for Western Samoa standard time before 1950.
Add commentary about Samoa before 1950.
* backward (Africa/Asmera, Africa/Timbuktu, Asia/Saigon):
Redo to avoid link-to-link.
* europe (Hungary, Europe/Bucharest): Several pre-1946
corrections: in 1918 the transition out of DST was on 09-16, not
09-29; in 1919 it was on 11-24, not 09-15; in 1945 it was on
11-01, not 11-03; in 1941 the transition to DST was 04-08 not
04-06 at 02:00; and there was no DST in 1920.
(Poland): Add source for 1919.
* southamerica: Add link for America/Antigua.
* NEWS: Document the above.  Add some thanks.
2014-07-15 22:24:50 -07:00
Paul Eggert 4b4e789d5c Replace Africa zones with links when that doesn't lose useful info.
* africa (Africa/Luanda, Africa/Porto-Novo, Africa/Gaborone)
(Africa/Ouagadougou, Africa/Bujumbura, Africa/Douala, Africa/Bangui)
(Indian/Comoro, Africa/Kinshasa, Africa/Lubumbashi, Africa/Brazzaville)
(Africa/Djibouti, Africa/Malabo, Africa/Asmara, Africa/Addis_Ababa)
(Africa/Libreville, Africa/Banjul, Africa/Accra, Africa/Conakry)
(Africa/Maseru, Indian/Antananarivo, Africa/Blantyre, Africa/Bamako)
(Africa/Nouakchott, Indian/Mayotte, Africa/Maputo, Africa/Niamey)
(Africa/Kigali, Atlantic/St_Helena, Africa/Sao_Tome, Africa/Dakar)
(Africa/Freetown, Africa/Mogadishu, Africa/Mbabane, Africa/Dar_es_Salaam)
(Africa/Lome, Africa/Kampala, Africa/Lusaka, Africa/Harare):
* antarctica (Antarctica/Syowa):
Remove zone, replacing each with a link to a region that has had
the same UTC offset since 1970.
* NEWS: Document this.
2014-07-09 12:23:27 -07:00
Paul Eggert 662016b64a Replace some zones with links when that doesn't lose useful info.
This is like the 2013-09-02 change, but for the Pacific this time.
* antarctica (Antarctica/DumontDUrville):
* australasia (Pacific/Tahiti, Pacific/Saipan, Pacific/Majuro)
(Pacific/Chuuk, Pacific/Pohnpei, Pacific/Palau, Pacific/Funafuti)
(Pacific/Midway, Pacific/Wake, Pacific/Wallis):
Remove zone, replacing each with a link to a region that has had
the same UTC offset since 1970.  This removes data that were
largely invented, either by us or almost surely by Shanks or his
sources.
* asia, australasia, northamerica: Create links accordingly.
* NEWS: Document this.
2014-07-08 23:48:16 -07:00
Paul Eggert f04facaf78 * europe: Fix date typos in recently-added commentary. 2014-07-08 19:32:38 -07:00
Paul Eggert 81ee353cdd Correct time in Russia before 1927 or so.
(Thanks to Vladimir Karpinsky for the Moscow corrections.)
Other corrections are taken from Milne 1899.
* asia (Asia/Tbilisi): Change LMT from 2:59:16 to 2:59:06.
(Asia/Tashkent): Change LMT from 4:37:12 to 4:37:11.
* europe (Europe/Helsinki): Change LMT from 1:39:52 to 1:39:49.
(Europe/Riga): Change LMT from 1:36:24 to 1:36:28.
(Europe/Moscow): Change LMT from 2:30:20 to 2:30:17.
Change 1916/9 time from 2:30:48 to 2:31:19.
(Asia/Yekaterinburg): Change LMT from 4:02:24 to 4:02:33.
(Asia/Irkutsk): Change LMT from 6:57:20 to 6:57:15.
(Asia/Vladivostok): Change LMT from 8:47:44 to 8:47:34.
* zone.tab (Europe/Moscow): Use Kilometer 0 point.
* NEWS: Document this.
2014-07-08 19:23:04 -07:00
Paul Eggert 27b3aeb0ba * zic.8, NEWS: Clarify use of time types in rule lines.
(Thanks to Arthur David Olson.)
2014-07-08 16:58:15 -07:00
Paul Eggert 674e42c59b New link Indian/Alfred_Faure for the Crozet and Scattered Islands.
(Thanks to Tobias Conradi and Antoine Leca.)
* africa, zone.tab (Indian/Alfred_Faure): New link.
* antarctica: Adjust commentary accordingly.
* NEWS: Document this.
2014-07-08 15:18:10 -07:00
Paul Eggert 70a26f8218 * australasia (Pacific/Apia, WS): Move DST data from Zone to Rule lines.
This doesn't change the output, but is shorter and easier to follow.
Trim and adjust commentary a bit.
2014-07-08 11:43:03 -07:00
Paul Eggert 63bea53af5 Pacify 'make check_character_set'. 2014-07-07 22:47:16 -07:00
Paul Eggert f4007fd42c Update zone.tab for Russia, and remove Asia/Tiksi comment.
My best guess is that the Asia/Tiksi entry is a false alarm,
and that the area hasn't diverged from Yakutsk since 1970.
* europe: Move zone.tab comments to zone.tab.
(Asia/Yakutsk): Move comment for Bulunsky district here,
Remove a comment about a draft Asia/Tiksi zone, containing the
Bulunsky district.  We don't have sufficient evidence that it
ever diverged from Yakutsk after 1970.
* zone.tab (RU): Reorder entries to make more geographical sense.
Add comments for draft zones Asia/Chita, Asia/Srednekolymsk.
(Europe/Samara, Asia/Novokuznetsk, Asia/Magadan, Asia/Kamchatka)
(Asia/Anadyr): Mention that the Moscow offset changes 2014-10-26.
* NEWS: Document the above.
2014-07-07 22:09:37 -07:00
Paul Eggert 3ddf68d115 * asia (Asia/Taipei): 1945 transition was 09-21 01:00, not 10-25.
Also, update commentary to describe recent changes better.
(Thanks to Yu-Cheng Chuang.)
* NEWS: Document this.
2014-07-04 11:01:17 -07:00
Paul Eggert 7287ec61a6 The Russian change is at 02:00 local time, not 02:00 Moscow time.
* europe (Europe/Kaliningrad, Europe/Moscow, Europe/Simferopol)
(Europe/Volgograd, Asia/Yekaterinburg, Asia/Omsk)
(Asia/Novosibirsk, Asia/Irkutsk, Asia/Yakutsk, Asia/Vladivostok):
The transition this fall is at 02:00 local time, not 02:00 Moscow time.
The newspaper report was wrong.  Also, add pointers to the bill and to
Krivenyshev's table.  (Thanks to Alexander Krivenyshev.)
2014-07-01 22:18:59 -07:00
Paul Eggert a26af2be66 Correct times for Asia/Taipei before 1945-10-25.
(Thanks to Yu-Cheng Chuang.)  Also, update time zone abbreviations for
Japan's two time zones used 1896-1937.  JWST now stands for Western
Standard Time, and JCST for Central Standard Time (formerly this was CJT).
* asia (Taiwan): Omit DST during 1945.
(Asia/Taipei): Add a transition to JWST on 1896-01-01, then to
JST on 1937-10-01, then to CST on 1945-10-25.
(Asia/Tokyo): Rename CJT to JCST.  Transition to JCST was 1937-10-01,
not 1938.
(Asia/Seoul, Asia/Pyongyang): Call UT+9 "JCST" until 1937-01-01,
"JST" thereafter.  Assume JCST/JST until Allied takeover after WWII.
* NEWS: Document this.
2014-07-01 18:22:47 -07:00
Paul Eggert e30b13efd4 Russia moves most of its clocks back an hour this fall.
(Thanks to Alexander Krivenyshev.)
* europe: Document FET separately.  Add a comment about
whether Zabajkal'skij kraj needs a separate zone.
(Europe/Kaliningrad, Europe/Moscow, Europe/Simferopol, Europe/Volgograd)
(Asia/Yekaterinburg, Asia/Omsk, Asia/Novosibirsk, Asia/Irkutsk)
(Asia/Yakutsk, and Asia/Vladivostok): Subtract an hour from the
time zone on 2014-10-26 at 02:00 Moscow time.
(Europe/Simferopol): Move to after Europe/Moscow, to simplify
similar maintenance in the future.
* NEWS: Document this.
2014-07-01 15:02:13 -07:00
Paul Eggert 90fc5d80e8 A few more commentary fixes related to AEST/AEDT etc.
* antarctica: Shrink commentary to fit into 80 columns.
* tz-link.htm: Rework example to use "CST" throughout.
2014-06-30 23:30:36 -07:00
Paul Eggert f7a73336e9 * asia: 'Urumqi' -> 'Ürümqi' in commentary. 2014-06-30 23:16:57 -07:00
Paul Eggert 15b01c042a Simplify China's time zones from five to two.
* NEWS, asia: Document this.
* asia (Asia/Harbin, Asia/Chongqing, Asia/Kashgar): Remove.
These are now links in 'backward'.
(Asia/Shanghai): Change pre-standard-time offset from 8:05:57 to
8:05:43.  Change transition to standard time from 1928 to 1901.
(Asia/Urumqi): Remove 1980 transition to UTC+8.
* backward (Asia/Harbin, Asia/Chongqing, Asia/Kashgar): New links.
(Asia/Chungking): Avoid link-to-link.
* zone.tab (Asia/Harbin, Asia/Chongqing, Asia/Kashgar): Remove.
2014-06-30 23:07:22 -07:00
Paul Eggert 81a7abf902 A few more fixes related to AEST/AEDT etc. (Thanks to Tim Parenti.)
* Theory: Use CST instead of EST in the example, so that it matches
the current database.
* antarctica (Antarctica/Casey): AWST, not WST.
* asia (Asia/Jayapura): ACST, not CST.
* australasia: Prepend "[A]" to "EST" in quote about EST.
2014-06-30 01:19:46 -07:00
Paul Eggert 62df86e10c Use AEST/AEDT etc. instead of EST etc. for Australian abbreviations.
* NEWS, australasia (Aus, Australia/Darwin, AW, Australia/Perth)
(Australia/Eucla, AQ, Holiday, Australia/Brisbane, Australia/Lindeman)
(AS, Australia/Adelaide, AT, Australia/Hobart, Australia/Currie, AV)
(Australia/Melbourne, AN, Australia/Sydney, Australia/Broken_Hill)
(LH, Australia/Lord_Howe, Antarctica/Macquarie):
Prefix Australian time zone abbreviations with "A", and switch
from "ST" to "DT" to denote daylight saving time.  (Thanks to Ian
Abbott, Russ Allbery, Timothy Arceri, Alan Barrett, Stuart Bishop,
Shaun Bouckaert, Stephen Colebourne, Tobias Conradi, Mark Davis,
Robert Elz, Clive D.W. Feather, Dennis Ferguson, Edwin Groothuis,
Guy Harris, John Hawkinson, John Haxby, Brian Inglis, Paul Koning,
Kevin Lyda, Curtis Manwaring, Alan Mintz, Arthur David Olson, Matt
Paine, David Patte, Tim Parenti, random832, Derick Rethans, SM,
Peter Stagg, Rich Tibbett, Bennett Todd, and Garrett Wollman for
their contributions to this topic.)
2014-06-30 00:35:15 -07:00
Paul Eggert 468555e32d Fix glitches with '-' and italics in man pages.
Using '\-' to denote ASCII minus has problems in groff output, since
it generates a minus sign in the current font, and if you cut and
paste from the documentation the resulting text won't work.  To avoid
the problem, define a string \*- that expands to ASCII minus in a
constant-width font in groff.  Also, change some instances of \(mi and
\(pl to use plain \- and +, since we no longer need special fonts for
these.  Finally, remove some no-longer-needed instances of "\^" after
italicized words.
2014-06-28 16:37:21 -07:00
Paul Eggert 8f065f5aa9 * asctime.c, newctime.3, newtzset.3: Don't imply ASCII is required. 2014-06-28 14:09:32 -07:00
Paul Eggert c25e1180cf More spelling and accent fixes.
Plus, update a now-obsolete source for Samoa's late-2011 change to the
International Date Line.
2014-06-27 16:06:47 -07:00
Paul Eggert 1f511fbd8b * leap-seconds.list: Copy from current NIST version. 2014-06-27 15:38:49 -07:00
Paul Eggert 8fd7c232b7 * zic.8: Fix formatting of long URL.
* zic.8: Format the URL better, by using groff's .URL macro,
falling back on a portable alternative for non-groff implementations.
2014-06-27 01:46:22 -07:00
Paul Eggert 5be5ee3dd4 Mention more JavaScript libraries.
* tz-link.htm, NEWS: Mention Moment Timezone, TimezoneJS.Date, Walltime-js,
and Timezone.  (Thanks to a heads-up from Matt Johnson.)  Also, list
license for timezone-olson.
2014-06-27 01:09:39 -07:00
Paul Eggert 2c780353d2 'zic' now rejects output file names with '.' or '..' components.
* zic.8, NEWS: Say that "." and ".." file name
components are not allowed in output file names.
* zic.c (componentcheck, namecheck): Do not allow such
file name components.
2014-06-26 23:37:51 -07:00
Paul Eggert f88bd423e6 Fix some 'zic' issues when run as root.
* zic.c: Use angle brackets for <sys/stat.h>.
(dolink): Don't try to link from a directory, as this can
cause trouble on some systems when superuser.
(dolink, itsdir): Rewrite to avoid use of 'access', which is
problematic when setuid.
(itsdir): If S_ISDIR is defined, use plain 'stat' and S_ISDIR;
that's more reliable.  Return -1 if trouble; all callers changed.
(mkdirs): Simplify by using mkdir-itsdir rather than
itsdir-mkdir-itsdir.  Don't assume strerror preserves errno.
2014-06-26 21:22:12 -07:00