Commit Graph
100 Commits
Author SHA1 Message Date
Paul Eggert b383bf6b67 * tzselect.ksh: Compute list of continents from the time zone table,
so that 'tzselect -t time' doesn't create a blind alley for the Arctic.
2013-08-20 12:00:07 -07:00
Paul Eggert ebdf0c5d0c tzselect: new options -c COORD and -n LIMIT
These let the user select TZ based on geographical coordinates.
Combining '-c COORD' with '-t time' better insulates the user from
issues of nationality.
* tzselect.8 (SYNOPSIS, OPTIONS): Document the new options.
* tzselect.ksh: Implement them, using the great-circle special
case of the Vicenty formula for distances on ellipsoids.
(LC_ALL): Set to C, since tzselect is English only.  That way, we
treat decimal-points in -c option operands the same in all environments.
(usage): Document new options.  Document existing ones better.
(output_distances): New variable.
2013-08-20 00:57:59 -07:00
Paul Eggert 98cf55b78e * date.c (nondigit): Add ATTRIBUTE_PURE, to pacify GCC 4.8.1. 2013-08-16 22:02:27 -07:00
Paul Eggert e0d4fb5f1e * zdump.c: Minor integer-size porting fixes.
(main): Don't assume SECSPERDAY <= INT_MAX here, since we try
not to assume that sort of thing elsewhere in this file.
Don't rely on undefined behavior in the weird case where
cuthitime < absolute_min_time + SECSPERDAY / 2.
2013-08-16 21:53:37 -07:00
Paul Eggert a52dc74e57 Fix misspelling in previous change. 2013-08-16 12:27:16 -07:00
Paul Eggert cc3f93886b Add -t ZONETABTYPE option to 'tzselect'.
This is a backwards-compatible way of transitioning to a less
politically-charged approach to choosing TZ values.  A new time
zone table time.tab acts like zone.tab, except it omits TZ values
that are present only for political reasons.  tzselect has a new
"-t zonetabtype" option that lets users select which time zone table
to use, and installers can select the default table.  The zone.tab
file does not change, and the default tzselect table for now is
zone.tab.  This avoids the backward-compatibility concerns
expressed on the tz mailing list; see, for example,
the discussion surrounding Derick Rethans's comments in
<http://mm.icann.org/pipermail/tz/2013-August/019544.html>
* .gitignore: Add time.tab.
* Makefile (ZONETABTYPE): New macro.
(TABDATA): Add time.tab.
(all): Depend on $(TABDATA).
(install): Do not depend on $(TABDATA), since $(DATA) includes it.
Install time.tab too.
(time.tab): New rule.
(tzselect.tab): Substitute ZONETABTYPE.
* zone-time.awk: New file.
* tzselect.8: Document new options, and --help and --version while
we're at it.
* tzselect.ksh (ZONETABTYPE): New var.
Implement -t ZONETABTYPE option.
Check that no extra operands are given.
* zone.tab: Change first comment line, to distinguish the two
tables better.
2013-08-16 12:19:42 -07:00
Paul Eggert d58b59dd8a * zone.tab (America/Shiprock): Remove.
This unnecessary duplicate of America/Denver was confusing, as it
incorrectly implied that 'Mountain Time - Navajo' differed from
'Mountain Time' either now or in the past.  Clarify this in a
better way, by mentioning in the Arizona entry that it doesn't
include Navajo.
2013-08-15 17:46:10 -07:00
Paul Eggert ecb109b11d Further removal of attempt to support floating-point time_t.
* localtime.c (timesub):
* zdump.c (my_localtime): Don't worry about time_t being floating-point.
* localtime.c (timesub): Avoid undefined behavior on integer
overflow when assigning time_t to int.
2013-08-15 14:31:51 -07:00
Paul Eggert 71b6c1b210 * zdump.c: Tune performance of -c with large numbers on 64-bit hosts.
On my platform (Ubuntu 13.04 x86-64, Xeon E3-1225 V2), this sped up
'zdump -V -c 2147483647,2147483648 America/Los_Angeles'
from 13.880 to 0.000 seconds user+system time.
(INTMAX_MAX): Define if the system doesn't.
(SECSPER400YEARS): New macro.
(SECSPER400YEARS_FITS): New constant.
(yeartot): Speed up by using division instead of
repeated subtraction.
2013-08-15 00:30:21 -07:00
Paul Eggert ee40570d7d Revert most of the recent zone.tab changes.
* iso3166.tab, zone.tab: Make it clear that country codes aren't
necessarily for countries.  Thanks to Derick Rethans for spotting this.
* zone.tab (Antarctica/McMurdo, Europe/Mariehamn, Europe/Sarajevo)
(America/St_Barthelemy, America/Kralendijk, Europe/Busingen)
(Europe/Guernsey, Europe/Zagreb, Europe/Isle_of_Man, Europe/Jersey)
(Europe/Podgorica, America/Marigot, Europe/Skopje, Europe/Ljubljana)
(Arctic/Longyearbyen, Europe/Bratislava, Europe/San_Marino)
(America/Lower_Princes, Europe/Vatican):
Undo recent changes, going back to the way these entries were done
in the last tz distribution.  Only the Antarctica/South_Pole change
was retained.
2013-08-14 12:14:23 -07:00
Paul Eggert 3e53972ea4 * .gitignore: Add 'leapseconds'.
This follows up on the previous change, since 'leapseconds'
is now generated automatically.
2013-08-14 11:58:03 -07:00
Paul Eggert 459b72d3ed Generate the 'leapseconds' file automatically from leap-seconds.list.
* leap-seconds.list: New file, copied from the NIST.
* leapseconds: Remove from git; it's now generated.
* leapseconds.awk: New file.
* Makefile (DATA): Add leap-seconds.list.  Remove leapseconds.
(MISC): Add leapseconds.awk.
(leapseconds): New rule.
(right_posix, posix_right): Depend on leapseconds.
(clean_misc): Remove leapseconds.
2013-08-12 23:58:29 -07:00
Paul Eggert 3cfb933344 Remove attempt to support floating-point time_t.
It wasn't tested and probably never worked, no platform used it,
and the latest POSIX no longer allows it.
* Makefile (typecheck): Don't check time_t being 'double'.
* Theory: Document the change.
* difftime.c (difftime):
* localtime.c (differ_by_repeat, tzload, timesub, time2sub):
* private.h (time_t_min, time_t_max):
* zdump.c (absolute_min_time, absolute_max_time, tformat):
Don't try to support floating-point time_t.
* localtime.c, private.h, zdump.c: Don't include float.h.
* localtime.c (truncate_time, double_to_time):
* private.h (TYPE_INTEGRAL):
* zdump.c (checkabsolutes):
Remove; no longer needed.  All uses removed.
* zdump.8 (LIMITATIONS): Remove discussion of floating-point time_t.
2013-08-12 01:41:34 -07:00
Paul Eggert 4e5dbe1bbf Use symbolic links to deduplicate installed files.
* Makefile (TZDIR_BASENAME): New macro.
(TZDIR): Use it.
(other_two): Remove.
(right_posix, posix_right): Use a symbolic link if supported.
This saves about 2 megabytes' worth of installed files.
2013-08-11 10:14:18 -07:00
Paul Eggert 5903db75e5 Move McMurdo and South Pole to 'backward'.
This continues in the series of moving entries to 'backward' if
they exist only because of obsolete tz rules about country codes.
This change does not affect any time stamps after 1970.  Unlike
the previous change in this series, this one does affect time
stamps before 1970, but that's OK as pre-1970 time stamps are
out of scope for the tz database.
* antarctica (Antarctica/McMurdo, Antarctica/South_Pole):
Move to 'backward' and link to Pacific/Auckland.
* backward: Move links here from 'antarctica'.
* zone.tab: Coalesce McMurdo and South Pole, and add Scott Base
to the description.
2013-08-11 10:06:56 -07:00
Paul Eggert 27722e5ae3 Change Indonesian time zone names to reflect common practice.
* asia (Asia/Dili, Asia/Jakarta, Asia/Pontianak, Asia/Makassar)
(Asia/Jayapura): Use WIB/WITA/WIT rather than WIT/CIT/EIT, since
it's typical to use Indonesian-language abbreviations even when
writing in English.  I surveyed the Internet and Google Books and
found several independent English-language sources using WIB/WITA/WIT,
whereas it seemed only tz-inspired sources used WIT/CIT/EIT.
Problem reported several times, by George Ziegler, Priyadi Iman
Nurcahyo, Zakaria, Jason Grimes, Martin Pitt, and Benny Lin;
see Lin's summary of the reports in
<http://mm.icann.org/pipermail/tz/2013-February/018609.html>.
This change does not affect time zone offsets, just alphabetic
abbreviations, such as tm_zone in the BSD-style struct tm.
(Asia/Jakarta): Use BMT, not JMT, for mean time from 1923 to 1932,
as Jakarta was called Batavia back then.
2013-08-11 08:58:06 -07:00
Paul Eggert 1eef2f6735 * southamerica: Fix misspelling of "Sint Maarten" in comment.
Reported by Philip Newton in
<http://mm.icann.org/pipermail/tz/2013-August/019512.html>.
2013-08-09 09:51:29 -07:00
Paul Eggert df99923bde Move links to 'backward' if they exist only because of country codes.
* backward: Move links here from other files, if the only reason
they existed was to fill out zone.tab.  Zones are now allowed to
cross national borders, so a zone now need not exist merely
because there's a national border.  Sort the list consistently.
None of this changes any time stamp in the database.
* checktab.awk: Don't require that zone.tab's column 3 be unique.
* europe (Europe/Jersey, Europe/Guernsey, Europe/Isle_of_Man)
(Europe/Mariehamn, Europe/Busingen, Europe/Vatican, Europe/San_Marino)
(Arctic/Longyearbyen, Europe/Ljubljana, Europe/Podgorica)
(Europe/Sarajevo, Europe/Skopje, Europe/Zagreb, Europe/Bratislava):
* northamerica (America/St_Barthelemy, America/Marigot):
* southamerica (America/Lower_Princes, America/Kralendijk):
Move links to 'backward'.
* zone.tab: Give more details about how different rows can have
duplicate column 1 or column 3.  For each link moved to 'backward',
change column 3 to be the non-backward name.
2013-08-09 02:05:40 -07:00
Paul Eggert b90b803c05 Add FreeBSD-style -r option to 'date'.
* date.1: Document -r.
* date.c (main, usage): Support -r.
(main, reset): Remove EBUG code.
(display): New argument NOW.  Do not exit; that's now the
caller's responsibility.  All callers changed.
(display, timeout, convert, checkfinal, iffy):
Don't assume that localtime and gmtime succeed.
This prevents a core dump for, e.g., 'date -r 0xffffffffffffffff'.
* private.h: Include float.h.
(strtoimax): New macro, for pre-C99 systems that lack strtoimax.
(time_t_min, time_t_max): New constants, from zdump, with
different names to avoid a clash when zdump.c includes private.h.
2013-08-09 02:01:31 -07:00
Paul Eggert fae3f9c2e8 * localtime.c: Fix integer overflow bug in mktime implementation.
(tmcomp): Don't mess up when atmp->tm_year - btmp->tm_year overflows.
This can happen when mktime is invoked on a struct tm with tm_year
equal to INT_MIN.
2013-08-08 23:55:26 -07:00
Paul Eggert 3e560d0811 * date.c: Pacify GCC 4.7.3.
(atof, getlogin, mktime, strchr, time, strftime):
Remove old-style declarations.  GCC 4.7.3 warns about them,
and they aren't needed nowadays anyway.
(main) [HAVE_SETTIMEOFDAY != 2]: "Use" dsttime and minuteswest
to pacify GCC 4.7.3.
2013-08-08 10:18:15 -07:00
Paul Eggert 8fe97ff3bc * Theory: Document time_t better and update for POSIX.1-2013.
Change "`" to "'"; these days, "`" and "'" are not symmetric.
2013-08-07 17:19:22 -07:00
Paul Eggert 3638e641e8 Don't bother with uintmax_t in previous change.
See the thread starting with Clive D.W. Feather's comments in
<http://mm.icann.org/pipermail/tz/2013-August/019496.html>.
* localtime.c (truncate_time): Don't bother with uintmax_t,
as using it doesn't help on any known platform.
* private.h (UINTMAX_MAX): Remove.
2013-08-07 16:08:39 -07:00
Paul Eggert b0bf6d8fee Avoid undefined behavior on integer overflow.
Problem reported by Alois Treindl in
<http://mm.icann.org/pipermail/tz/2013-August/019493.html>.
* localtime.c (truncate_time): New function.
(localsub): Use it to avoid undefined behavior on integer overflow.
* private.h (INTMAX_MAX, INTMAX_MIN, UINTMAX_MAX):
New macros, for older platforms that lack them.
2013-08-07 09:03:09 -07:00
Paul Eggert 5ea7a94f6a Revert unintended change to ABI for extern functions.
* localtime.c (offtime, timeoff, gtime): Revert change to ABI, by
going back to 'long' instead of 'int_fast32_t' for types accepted
and returned by extern functions.  Reported by Christos Zoulas in
<http://mm.icann.org/pipermail/tz/2013-July/019488.html>.
2013-07-21 08:24:45 -07:00
Paul Eggert ba39973190 Rework to avoid bogus warning from clang -Wliteral-conversion.
Reported by Andy Heninger in
<http://mm.icann.org/pipermail/tz/2013-July/019446.html>.
* localtime.c (double_to_time): New function.
(timesub): Use it.
2013-07-08 15:51:18 -07:00
Paul Eggert 8f10e5c535 Release tzcode2013d and tzdata2013d.
* Makefile (VERSION): Increase to 2013d.
2013-07-05 07:38:01 -07:00
Paul Eggert 4e3a632736 Update link page.
* tz-link.htm: Add commentary section.  Update URLs and titles.
Add links to Firefox OS, Bill Seymour's intro, Jon Udell's appreciation,
W3C's "Working with Time Zones".
2013-07-03 01:31:47 -07:00
Paul Eggert 30344f7c14 Move Morocco's midsummer 2013 transitions.
* africa (Morocco): This year's midsummer transitions are
July 7 and August 10, not July 9 and August 8.
Thanks to Andrew Paprocki in
<http://mm.icann.org/pipermail/tz/2013-July/019421.html>.
2013-07-02 23:49:41 -07:00
Paul Eggert 985296c911 * tz-art.htm: A couple more fixes. 2013-05-31 00:48:37 -07:00
Paul Eggert ea308a6345 Spelling fixes.
Most of these are from Kevin Lyda in
<http://mm.icann.org/pipermail/tz/2013-May/019407.html>,
with a couple more from Jonathan Leffler in
<http://mm.icann.org/pipermail/tz/2013-May/019409.html>.
2013-05-31 00:21:25 -07:00
Paul Eggert 5546a79cea * asia (Asia/Jerusalem): Fix LMT to match more-precise longitude.
Suggested by Tim Parenti in
<http://mm.icann.org/pipermail/tz/2013-May/019410.html>.
2013-05-30 08:54:25 -07:00
Paul Eggert 8b05d8e8ec * zdump.8: Fix minor typos in recent changes. 2013-05-30 00:00:09 -07:00
Paul Eggert f0133dd86a Port to NetBSD, where, e.g., 'time_t' is wider than 'long'.
I audited the code and fixed as many width-asssumptions as I could
find, including several places where the code assumed that 'time_t'
was no wider than 'long'; this assumption is not true on 32-bit
NetBSD platforms.  This caught every problem that is already fixed
in the NetBSD zic.c, and caught quite a few more.
* Makefile: Add comments re HAVE_DOS_FILE_NAMES and HAVE_INTTYPES_H.
* date.c (checkfinal, netsettime): Don't use 'long' where 'int' will do.
* difftime.c (difftime): Mark with ATTRIBUTE_CONST.
Use uintmax_t, not unsigned long, for the widest unsigned integer type.
Use long double, not double, if time_t is wider than uintmax_t;
this can in theory help on nonstandard platforms, such as GCC
with 64-bit uintmax_t and 128-bit __int128_t.
* localtime.c (struct ttinfo.tt_gmtoff, struct rule.r_time)
(detzcode, getsecs, getoffset, gmtsub, localsub, increment_overflow32)
(normalize_overflow32, time1, time2, timesub, transtime, tzparse)
(time2sub, timeoff, gtime):
* tzfile.h (SECSPERDAY):
* zdump.c (SECSPERDAY):
* zic.c (convert, puttzcode):
Use int_fast32_t, not long, when all we care is that values up to
2**31 can be stored.  This doesn't fix any bugs, but it allows
more opportunity for compiler optimization.
(struct lsinfo.ls_corr, timesub, leapcorr):
Use int_fast64_t, not long, when values up to 2**63 can be stored.
(timesub): Make it clearer when we are truncating 0.5 to 0.
(increment_overflow32): Rename from long_increment_overflow.
All uses changed.
(normalize_overflow32): Rename from long_normalize_overflow.
All uses changed.
* private.h (HAVE_INTTYPES_H, ATTRIBUTE_CONST): New macros.
Include <inttypes.h> if HAVE_INTTYPES_H.
(INT_FAST64_MIN, INT_FAST64_MAX, SCNdFAST64, int_fast32_t, PRIdMAX)
(uintmax_t, PRIuMAX, _Noreturn):
Define to reasonable values if it's an older compiler.
* scheck.c (scheck): Add support for arbitrary formats, such as
those that SCNdFAST64 can expand to, at the price of no longer
supporting weird conversion specs like "%[%]".
* strftime.c (_fmt): Use intmax_t and uintmax_t to format time_t,
not long and unsigned long.
* zdump.c (int_fast32_t, intmax_t, PRIdMAX, SCNdMAX):
Define for pre-C99 compilers, like private.h does.
(delta, yeartot, main): Use intmax_t, not long.
(hunt): Use time_t, not long, since the diff must be nonnegative.
(tformat): Allow for time_t wider than long.
* zic.c (ZIC_MIN, ZIC_MAX, SCNdZIC): New macros.
(OFFSET_STRLEN_MAXIMUM, RULE_STRLEN_MAXIMUM): Remove.
(struct rule): Make r_loyear, r_hiyear, r_tod, r_stdoff, z_gmtoff,
z_stdoff zic_t, not long.
(addtype, gethms, oadd, rpytime, tadd, gmtoffs, corr, inleap)
(stringoffset, stringrule, outzone, addtype, adjleap, rpytime)
(LDAYSPERWEEK):
Use zic_t, not long.
(leapminyear, leapmaxyear, min_year, max_year, rulesub, updateminmax)
(outzone, rpytime):
Use zic_t, not int.
(usage): Now _Noreturn.
(main): Use S_IWGRP, not 'unix', to determine whether to call umask.
(writezone): Omit unnecessary cast.
(mkdirs): Use HAVE_DOS_FILE_NAMES, not 'unix', to determine
whether to parse DOS file anmes.
(eitol): Remove; no longer needed.
2013-05-27 21:26:18 -07:00
Paul Eggert d3b025adb2 Adjust commentary to try to defuse recent issues somewhat.
This change stemmed from a long discussion on the tz mailing list
about what country the Jerusalem zone entry is in.  The idea of
this change is to deemphasize the role of countries in the tz
database, to lessen the amount of controversy in the future.
Due to backward compatibility concerns this change does not eliminate
the role of countries entirely.  With one minor exception this
change does not alter any code or data, just comments.
* Theory, zone.tab: Deemphasize the role of countries in choosing
location names, as they tend to introduce political conflict
during maintenance, and country information isn't needed for
typical uses of the database.
* Theory: Say that names should differ in more than just case, and why;
and explain why 'backward' means old names will continue to work.
(thanks to Norbert Lindenberg for spotting these issues).
Update citation date and URL.
* iso3166.tab: Mention latest maintenance update.
Update citation URL.  Add missing comma for BQ.
Be more consistent about abbreviating Sint like Saint.
Mention SX "Dutch part" for consistency with MF "French part".
* iso3166.tab, zone.tab: Add legal/territorial disclaimer.
* zone.tab: Say that country/zone overlaps can occur in both
directions, and that column 2 need not lie within column 1.
(Asia/Jerusalem): Change the coordinates from a sloppy value,
taken from an old astrology book, to a more-precise value, the
site of city hall.  The sloppy value sparked some controversy and
the hope is that the more-precise value will be a bit less
controversial.
2013-05-27 18:08:26 -07:00
Paul Eggert 4c43a92919 Add tests for 32- and 64-bit signed and unsigned time_t.
* Makefile (TIME_T_ALTERNATIVES): New macro.
(check_time_t_alternatives, clean_misc): New rules.
(clean): Split out into clean_misc and removing tzpublic.
(public): Add check_time_t.
2013-05-27 14:59:14 -07:00
Paul Eggert 8a883a64cb Add support for testing time_t types other than the system's.
This makes it easier to test on (say) Debian, even if we're
testing the time_t type on (say) NetBSD.  NetBSD uses 64-bit
time_t on 32-bit hosts, and this lets us test a NetBSD-style
implementation (32-bit 'long', 64-bit time_t) on a 32-bit Debian host.
* Makefile: Update comments to talk about TIME_T_FLOATING and time_tz.
Sort the comments.
* private.h (restrict): Define to empty with older compilers.
'restrict' is now needed, to define gmtime_r and localtime_r in
standard ways when time_tz is defined.
Make the following changes if time_tz is defined:
(sys_time, time): New static functions.  The former is the system
'time' function that applies to the system time_t, the latter
our function that applies to our time_t.
(time_t, ctime, ctime_r, difftime, gmtime, gmtime_r, localtime)
(localtime_r, mktime): Rename to tz_time_t, tz_ctime, etc.,
via macros.  Declare the renamed versions.
* zdump.8: Document new options -V, -t.
* zdump.c: Include private.h if time_tz is defined.
(INITIALIZE): Remove; no longer needed.
(absolute_min_time, absolute_max_time): Work even if time_t
is wider than intmax_t, which can be true with GCC and __int128_t.
Use the new TIME_T_FLOATING macro for this.
(usage): Document new flags.
(main): Support them.
2013-05-27 14:59:09 -07:00
Paul Eggert bc0d28a763 Update URL for CLDR Zone->Tzid table.
* tz-link.htm: Fix link.  Problem eported by Yoshito Umaoka in
<http://mm.icann.org/pipermail/tz/2013-May/019284.html>.
2013-05-10 11:22:21 -07:00
Paul Eggert f599ad15ce Release tzcode2013c and tzdata2013c.
* Makefile (VERSION): Increase to 2013c.
2013-04-19 16:17:40 -07:00
Paul Eggert 188b29d966 Fix times of habitation for Macquarie to agree with Tasmania history.
Also, sort Macquarie more-consistently with other parts of Australia.
This doesn't affect time stamps, just zone selection.
Problems reported by Tim Parenti in
<http://mm.icann.org/pipermail/tz/2013-April/019060.html>.
* australasia (Antarctica/Macquarie): Tasmania Parks & Wildlife Service
history indicates that permanent habitation was 1899-1918 and 1948 on.
* zone.tab (Antarctica/Macquarie): Move next to Lord Howe and Tasmania.
2013-04-17 09:23:34 -07:00
Paul Eggert a676f5ad3b Macquarie Island is politically part of Australia, not Antarctica.
This doesn't affect time stamps, just zone selection.
Problem reported by Tobias Conradi in
<http://mm.icann.org/pipermail/tz/2013-April/019023.html>.
* antarctica (AusAQ, ATAQ): Remove; no longer needed.
* australasia (Antarctica/Macquarie): Move here from
the 'antarctica' file.  Use Aus and AT rather than
AusAQ and ATAQ.
* zone.tab (Antarctica/Macquarie): Country code AU, not AQ.
2013-04-15 00:00:01 -07:00
Paul Eggert 65da15f972 Palestine observes DST starting March 29, 2013 (reworked).
Thanks to Steffen Thorsen, in
<http://mm.icann.org/pipermail/tz/2013-March/018812.html>.
An earlier version of this patch was mistaken.
Thanks to Petr Machata for reporting some of the bugs, in
<http://mm.icann.org/pipermail/tz/2013-March/018814.html>.

* asia (Palestine, Asia/Gaza, Asia/Hebron): Incorporates the latest info
from timeanddate.com about Palestine.  When combined with the previous
(incorrect) patch this incorporates the following changes for Gaza and
Hebron:

  The spring 2008 change in Gaza and Hebron was on 00:00 Mar 28, not
  00:00 Apr 1.

  The fall 2009 change in Gaza and Hebron on Sep 4 was at 01:00, not
  02:00.

  The spring 2010 change in Hebron was 00:00 Mar 26, not 00:01 Mar 27.
  timeanddate.com's table says 02:00, but the text at
  <http://www.timeanddate.com/news/time/gaza-and-west-bank-dst-2010.html>
  says 00:00.

  The spring 2011 change in Gaza was 00:01 Apr 1, not 12:01 Apr 2.
  timeanddate's table says 00:00, but the text at
  <http://www.timeanddate.com/news/time/west-bank-starts-dst-2011.html>
  says 00:01.

  The spring 2011 change in Hebron on Apr 1 was at 00:01, not 12:01.

  The fall 2011 change in Hebron on Sep 30 was at 00:00, not 03:00.

  From 2013 on, Gaza and Hebron both observe DST, with the predicted
  rules being the last Thursday in March at 24:00 to the first Friday on
  or after September 21 at 01:00.
2013-04-14 23:39:54 -07:00
Paul Eggert 63814cf0a8 Palestine observes DST starting March 29, 2013.
Thanks to Steffen Thorsen, in
<http://mm.icann.org/pipermail/tz/2013-March/018812.html>.
* asia (Palestine): Add rules for 2011 on, to simplify Gaza and Hebron.
Adjust to recently announced changed.
(Asia/Gaza, Asia/Hebron): Use adjusted rules.
2013-03-26 14:23:08 -07:00
Paul Eggert 0a700f096a Assume Paraguay change is permanent.
* southamerica (Para): Move end of DST to the 4th Sunday in March
every year.  Suggested by Carlos Raúl Perasso in
<http://mm.icann.org/pipermail/tz/2013-March/018788.html>.
2013-03-15 12:26:57 -07:00
Paul Eggert 014d6f775d Release tzcode2013b and tzdata2013b.
* Makefile (VERSION): Increase to 2013b.
2013-03-10 22:33:40 -07:00
Paul Eggert 6b8911ccc3 Update URLs in tz-link page.
* tz-link.htm: Add URLs for webOS, BB10, iOS.  Update URL for Solaris.
Mention Internet RFC 6557.  Update Internet RFCs 2445->5545,
2822->5322.  Switch from FTP to HTTP for Internet RFCs.
2013-03-10 22:29:53 -07:00
Paul Eggert cfdfcf9e91 * northamerica (Haiti): Haiti is using US-style rules this year, too.
Assume this will continue.  Thanks to Steffen Thorsen, in
<http://mm.icann.org/pipermail/tz/2013-March/018761.html>.
2013-03-10 21:22:47 -07:00
Paul Eggert d89986e3aa Paraguay ends DST early this year.
* southamerica (Para): DST ends on March 24 this year.  (Thanks to
Steffen Thorsen).  For now, assume the change is just this year.
2013-03-07 14:12:38 -08:00
Paul Eggert 95e6f814bb Estimate Morocco 2013-2038 transitions for Ramadan.
* africa (Morocco): Use GNU Emacs 24.3 to estimate Ramadan-based
DST transition dates for 2013-2038.  Heads-up by Erik Homoet in
<http://mm.icann.org/pipermail/tz/2013-February/018680.html>.
2013-03-06 22:32:18 -08:00
Paul Eggert 0fdbcdc252 Release tzcode2013a and tzdata2013a.
* Makefile (VERSION): Increase to 2013a.
2013-02-27 09:20:35 -08:00
Paul Eggert cec2e7019a Chile is changing its DST rules.
Thanks to Steffen Thorsen for the heads-up, in
<http://mm.icann.org/pipermail/tz/2013-February/018623.html>.
* antarctica (ChileAQ):
* southamerica (Chile):
Assume the 2012 rules will continue indefinitely.  Suggested by Robert
Elz in <http://mm.icann.org/pipermail/tz/2013-February/018636.html>.
2013-02-20 23:40:23 -08:00
Paul Eggert 68efd69762 Incorporate data from Milne (1899).
The source is: Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
<http://www.jstor.org/stable/1774359>.
* africa (Africa/Gaborone, Africa/Cairo):
* asia (Asia/Rangoon, Asia/Shanghai, Asia/Hong_Kong, Asia/Aden):
* australasia (Pacific/Fiji):
* europe (Europe/Vienna):
* northamerica (America/Nassau, America/Barbados, Atlantic/Bermuda)
(America/Costa_Rica):
* southamerica (America/Bogota, America/Curacao):
Adjust old time stamps to match Milne.  I went going through
Milne's list one by one and did not finish, but the rest can be
done later.
2013-02-20 23:00:40 -08:00
Paul Eggert 09936256b9 * tz-link.htm: Add pointer to tz.js. Update URLs. 2013-02-20 22:39:27 -08:00
Paul Eggert 3c6cc4544d Allow 24:00 at the end of version-2-format time zone files.
* zic.c (stringoffset): Allow 24:00.  POSIX.1-2008 allows 24:00,
even though older versions of POSIX maxed out at 23:59:59.
Patch from Arthur David Olson.
2013-02-20 22:05:52 -08:00
Paul Eggert d4266a8cac * strftime.c: Also mention sccsid in the "Based on" comment. 2013-01-12 12:04:36 -08:00
Paul Eggert 0d43a76fca * strftime.c: Bring back "Based on UCB" comment.
This was inadvertently omitted when SCCS keywords were removed.
2013-01-11 20:54:47 -08:00
Paul Eggert 78d0395d95 Move 'make check' to Ubuntu 12.10.
* Makefile (SGML_DTDDIR): New macro, for easier porting.
Update to file name used in Ubuntu 12.10.
(SGML_SEARCH_PATH): Use SGML_DTDDIR.
2013-01-11 12:02:22 -08:00
Paul Eggert 3daaa8e346 New alias Europe/Busingen for Europe/Zurich.
* europe, zone.tab (Europe/Busingen): New Link.  See Arthur David Olson
in <http://mm.icann.org/pipermail/tz/2013-January/018511.html>.
Original heads-up from Tobias Conradi in
<http://mm.icann.org/pipermail/tz/2011-September/008784.html>.
2013-01-11 11:58:07 -08:00
Paul Eggert daadd70793 Check that the distributed files use a safe ASCII subset.
* Makefile (TAB_CHAR, INVALID_CHAR1, INVALID_CHAR2, INVALID_CHAR3)
(INVALID_CHAR): New macros.
(check_character_set): New rule.
(check): Use it.
2012-12-13 17:19:47 -08:00
Paul Eggert 3423c7fa4a Stick to ASCII in commentary.
* southamerica: Rewrite to avoid the need for Latin-1 bytes.
Perhaps someday we should allow non-ASCII characters in commentary,
but if we do so we should use UTF-8.  Reported by Andy Heninger in
<http://mm.icann.org/pipermail/tz/2012-December/018480.html>.
2012-12-13 16:32:22 -08:00
Paul Eggert 318a6e5dcc Update zones Asia/Khandyga, Asia/Ust-Nera for pre-2004 time.
* europe (Asia/Khandyga, Asia/Ust-Nera): Modify pre-2004 history
to agree with Shanks and Pottenger (2003), since we have no better info.
2012-11-25 18:57:05 -08:00
Paul Eggert a435f9f0ec Make bug-reporting address more configurable.
Based on a patch by Joseph S. Myers in
<http://mm.icann.org/pipermail/tz/2012-November/018452.html>.
* Makefile (BUGEMAIL): New macro.
(version.h, tzselect): Use it to define REPORT_BUGS_TO.
* tzselect.ksh (REPORT_BUGS_TO): New variable, used for --help.
* zdump.c, zic.c (usage): Use REPORT_BUGS_TO for --help.
2012-11-12 21:52:35 -08:00
Paul Eggert dec96c09a2 Release tzcode2012j and tzdata2012j.
* Makefile (VERSION): Increase to 2012j.
2012-11-12 18:34:49 -08:00
Paul Eggert 4222458f3f FoxClocks update.
* tz-link.htm: Update FoxClocks info as per Andy McDonald
<http://mm.icann.org/pipermail/tz/2012-November/018458.html>.
2012-11-12 18:33:22 -08:00
Paul Eggert ef8095aaf8 Update documentation.
* tz-link.htm: Prune no-longer-working URLs, update URLs that got
moved, sort a bit.  The most-important casualty is the Norwegian
Meteorological Institute's web page for Summer time in Norway,
formerly at <http://met.no/met/met_lex/q_u/sommertid.html>: it's
no longer there and I can't find out where it moved to, if
anywhere.
* tzfile.5: Fix minor grammar problem.
2012-11-11 23:42:00 -08:00
Paul Eggert c7698fdca6 Libya moving to CET, but with DST.
* africa (Libya, Africa/Tripoli): Libya switched to CET
on 2012-11-10 at 02:00, and plans to switch to CEST
Mar lastFri 1:00 and switch back Oct lastFri 2:00.
Thanks to Even Scharning, Steffen Thorsen, and Tim Parenti,
with the thread starting in
<http://mm.icann.org/pipermail/tz/2012-November/018449.html>.
2012-11-11 22:01:49 -08:00
Paul Eggert 89a60086d3 Output version info in a more-typical format.
E.g., "zic (tzcode) 2012i" instead of "tzcode2012i".
Thread started by Joseph S. Myers in
<http://mm.icann.org/pipermail/tz/2012-November/018439.html>.
* Makefile (PACKAGE): New macro.
(version.h, tzselect): New constant PKGVERSION, derived from PACKAGE.
(tzselect): TZVERSION is now simply VERSION, since PACKAGE is also
output.
* tzselect.ksh (PKGVERSION): New var, which Makefile substitutes for.
(--usage, --version): Exit with nonzero status if we can't
output the help or version number.
* tzselect.ksh (--version):
* zdump.c, zic.c (main):
Output versions like this: "zdump (tzcode) 2012i".
2012-11-09 18:12:22 -08:00
Paul Eggert bd6e304281 Change email address to tz@iana.org.
* africa, australasia, europe, northamerica, southamerica:
* tzselect.ksh, zdump.c, zic.c:
In commentary and strings, change email address from
tz@elsie.nci.nih.gov to tz@iana.org, as the old email address
no longer works.
2012-11-09 17:49:36 -08:00
Paul Eggert 06c1441286 * asia (Zion): Comment that it's law now, from Ephraim Silverberg. 2012-11-05 06:40:30 -08:00
Paul Eggert 2577472467 Improve logic of zic -v abbreviation-length check.
This fixes a bunch of "time zone abbreviation has more than 3
alphabetics" diagnostics for 'make check_public'.
* zic.c (newabbr): Check for <3 alphabetics, not for >3.
POSIX-2008 requires at least 3 and says that it's not portable to
use more than 6, which we check elsewhere.
2012-11-03 19:43:21 -07:00
Paul Eggert cb66ad8326 Check 'public' more carefully.
* Makefile (ZFLAGS): Remove obsolete comment.
(check_public): Put temporary directory under this directory, not
under /tmp, as that's better if one is doing multiple builds in
parallel.  Also, use the just-built zic rather than the system zic.
(clean): Remove temporary directory.
2012-11-03 19:39:56 -07:00
Paul Eggert 4fc4c4cf40 Use .asc and not .sign for PGP signatures.
* Makefile (maintainer-clean): Clean *.asc files and *.tar.gz files.
(signatures): Use .asc instead of .sign as the extension for signatures
as this works better with other software.  Reported by Phil Pennock.
* .gitignore: Also ignore .asc files.
2012-11-03 17:41:16 -07:00
Paul Eggert a1752133a1 Release tzcode2012i and tzdata2012i.
* Makefile (VERSION): Increase to 2012i.
2012-11-03 12:57:09 -07:00
Paul Eggert d31d208f7e Automate the building of tarball signatures.
* Makefile (public): Rewrite in terms of new rules, below.
(check_public): New rule, containing the old checking part of
'make public'.
(tarballs): New rule, containing the old tarball-making part of
'make public'.  Do not run checktab twice.
(signatures, tzcode$(VERSION).tar.gz.sign, tzdata$(VERSION).tar.gz.sign):
New rules.
2012-11-03 12:56:05 -07:00
Paul Eggert 0ff4ee1dd4 Cuba switches to standard time on November 4 this year.
* northamerica: Alter Cuba rules accordingly.
Thanks to Steffen Thorsen for the heads-up, in
<http://mm.icann.org/pipermail/tz/2012-November/018427.html>.
2012-11-03 01:45:16 -07:00
Paul Eggert 5fe2d18b25 * tz-link.htm: Mention github. Update DC.Identifier to point to IANA. 2012-10-28 03:05:29 -07:00
Paul Eggert b0920a5626 * asia: Fix misspelling in comment. 2012-10-28 03:04:03 -07:00
Paul Eggert 6daf83cd40 Have tzselect.ksh use Bash by default; this can be overridden.
* Makefile (KSHELL): New macro.
(tzselect): Use it.
* tzselect.ksh: Use "#!/bin/bash", not "#! /bin/ksh".  The Makefile
can override this.  No need for a space after "!'; that was put in
years ago only because of an urban legend.
2012-10-27 13:54:13 -07:00
Paul Eggert 540e58b0aa Makefile portability improvements.
* Makefile (LDFLAGS): Rename from LFLAGS, with backwards compatibility.
All uses changed.  Suggested by Mike Frysinger in
<http://mm.icann.org/pipermail/tz/2012-October/018396.html>.
(zdump, zic, date): Use $(CC) -o $@ ... rather than $(CC) ... -o $@,
for portability to strict older POSIX hosts.
($(TZLIB)): Don't use [ ... -o ... ], as it's not portable.
2012-10-27 13:19:45 -07:00
Paul Eggert cff2e6fb6e * Makefile (AWK): Default to 'awk'; this is more portable these days.
Suggested by Mike Frysinger in
<http://mm.icann.org/pipermail/tz/2012-October/018397.html>.
2012-10-27 12:36:00 -07:00
Paul Eggert 001a626d31 Release tzcode2012h and tzdata2012h.
* Makefile (VERSION): Increase to 2012h.
2012-10-26 22:49:10 -07:00
Paul Eggert 2151ca6b20 Restore 'register'.
* asctime.c (asctime_r, asctime):
* date.c (main, dogmt, reset, nondigit, sametm, convert, checkfinal):
* ialloc.c (icatalloc):
* localtime.c (detzcode, detzcode64, settzname, tzload)
(typesequiv, getzname, getqzname, getnum, getsecs, getoffset)
(getrule, transtime, tzparse, tzset, localsub, gmtsub)
(leaps_thru_end_of, timesub, increment_overflow)
(long_increment_overflow, normalize_overflow)
(long_normalize_overflow, tmcomp, time2sub, time1, leapcorr):
* scheck.c (scheck):
* strftime.c (_yconv):
* zdump.c (my_localtime, abbrok, main, yeartot, hunt)
(delta, show, abbr, dumptime):
* zic.c (main, dolink, itsdir, associate, infile, inrule)
(inzone, inzcont, inzsub, inleap, inlink, rulesub, convert64)
(writezone, doabbr, stringoffset, stringrule, stringzone)
(outzone, addtype, leapadd, adjleap, ciequal, itsabbr, byword)
(getfields, rpytime, newabbr, mkdirs):
Restore the uses of 'register', reverting that part of the
"More C modernization" patch.  See Arthur David Olson in
<http://mm.icann.org/pipermail/tz/2012-October/018385.html>.
2012-10-26 17:37:42 -07:00
Paul Eggert ff07530c90 Changes for Bahia, Tocantins, Israel, Jordan.
* asia (Zion): New Israeli rules next year.  See Ephraim Silverberg in
<http://mm.icann.org/pipermail/tz/2012-October/018351.html>.
(Jordan): Jordan stays on DST this winter.  See Steffen Thorsen in
<http://mm.icann.org/pipermail/tz/2012-October/018374.html>.
* southamerica (America/Araguaina): Now has DST.  See Rodrigo Severo in
<http://mm.icann.org/pipermail/tz/2012-October/018346.html>.
(America/Bahia): No longer has DST.  See Kelley Cook in
<http://mm.icann.org/pipermail/tz/2012-October/018349.html>.
2012-10-26 00:50:05 -07:00
Paul Eggert 116520ac03 Web page updates.
* tz-link.htm (DC.Identifier): Move canonical location to cs.ucla.edu.
Move public-domains and corrections notices to <address>.
Update some URLs.  Add Android.  Mac OS X has been renamed to OS X.
2012-10-26 00:48:56 -07:00
Paul Eggert c350bfd55f More C modernization.
* Makefile (typecheck): Add -D__time_t_defined to CFLAGS,
for glibc 2.15.
* asctime.c (asctime_r, asctime):
* date.c (main, dogmt, reset, nondigit, sametm, convert, checkfinal):
* ialloc.c (icatalloc):
* localtime.c (detzcode, detzcode64, settzname, tzload)
(typesequiv, getzname, getqzname, getnum, getsecs, getoffset)
(getrule, transtime, tzparse, tzset, localsub, gmtsub)
(leaps_thru_end_of, timesub, increment_overflow)
(long_increment_overflow, normalize_overflow)
(long_normalize_overflow, tmcomp, time2sub, time1, leapcorr):
* scheck.c (scheck):
* strftime.c (_yconv):
* zdump.c (my_localtime, abbrok, main, yeartot, hunt)
(delta, show, abbr, dumptime):
* zic.c (main, dolink, itsdir, associate, infile, inrule)
(inzone, inzcont, inzsub, inleap, inlink, rulesub, convert64)
(writezone, doabbr, stringoffset, stringrule, stringzone)
(outzone, addtype, leapadd, adjleap, ciequal, itsabbr, byword)
(getfields, rpytime, newabbr, mkdirs):
Omit 'register', as it adds no value these days.  See Christos Zoulas in
<http://mm.icann.org/pipermail/tz/2012-October/018376.html>.
* date.c (netsettime) [TSP_SETDATE]: Add forward decl.
Don't rely on implicit int.  Now static.  Use NULL, not 0.
* zdump.c: Include "limits.h".
(absolute_min_time, absolute_max_time): Compute at compile-time,
as the run-time tests relied on undefined behavior.
(checkabsolutes): Rename from setabsolutes.  Just check, since
there's nothing to set now.  All uses changed.
2012-10-26 00:48:01 -07:00
Paul Eggert ec6a124c84 Release tzcode2012g and tzdata2012g.
* Makefile (VERSION): Increase to 2012g.
(COMMON): New macro.
(DOCS): Remove Makefile.
(ENCHILADA): Adjust to above changes.
(public): Put $(COMMON) in both tarballs, so that the version
number is in both distributions.
2012-10-17 20:59:45 -07:00
Paul Eggert 22406c0da5 Samoa fall 2012 and later
* australasia (WS): New rule.
(Pacific/Apia): Use it, for new DST rules for Western Samoa.
Thanks to Nicholas Pereira for the heads-up and to Robert Elz
for coding up the rules.
2012-10-12 07:55:45 -07:00
Paul Eggert d2aee3a835 Palestine fall 2012
* asia (Asia/Gaza, Asia/Hebron): Fall transition was
Sep 21, not Sep 28.  Thanks to Steffen Thorsen for this.
2012-10-12 07:54:44 -07:00
Paul Eggert 400ecf36bb Assume C89.
* Makefile (GCC_DEBUG_FLAGS): Modernize for GCC 4.6.3 x86.
* asctime.c (asctime_r, asctime):
* date.c (main, dogmt, reset, wildinput, nondigit, oops, display)
(timeout, sametm, netsettime):
* difftime.c (difftime):
* ialloc.c (icatalloc, icpyalloc):
* localtime.c (detzcode, detzcode64, differ_by_repeat)
(tzload, typesequiv, getzname, getnum, getsecs, getoffset)
(getrule, transtime, tzparse, gmtload, tzsetwall, tzset)
(localsub, localtime, localtime_r, gmtsub, gmtime, gmtime_r)
(offtime, leaps_thru_end_of, timesub, ctime, ctime_r)
(increment_overflow, long_increment_overflow)
(normalize_overflow, long_normalize_overflow, tmcomp, time2sub)
(time2, time1, mktime, timelocal, timegm, timeoff, gtime)
(leapcorr, time2posix, posix2time):
* scheck.c (scheck):
* strftime.c (strftime, _fmt, _conv, _add, _yconv, _loc):
* zdump.c (my_localtime, abbrok, usage, main, yeartot)
(delta, abbr, dumptime):
* zic.c (memcheck, eats, eat, error, warning, main)
(dolink, itsdir, rcomp, associate, infile, gethms, inrule)
(inzone, inzcont, inzsub, inleap, inlink, rulesub, convert)
(convert64, puttzcode, puttzcode64, atcomp, is32, writezone, DO)
(doabbr, updateminmax, stringoffset, stringrule, stringzone)
(outzone, addtt, addtype, leapadd, yearistype, lowerit, ciequal)
(itsabbr, byword, getfields, oadd, tadd, rpytime, newabbr)
(mkdirs, eitol):
Assume C89 or better.  Mostly this consists of using function
prototypes.  In a few places, prototypes are required for
portability to hosts where time_t does not promote to itself and
where a preceding prototype does not override a definition.  But
while we're at it we might as well be consistent: it's safe to
assume at-least-C89 these days.
* ialloc.c (nonzero, imalloc, icalloc, irealloc, ifree, icfree):
Remove; no longer needed now that we assume C89 or better.
All callers changed to use malloc, calloc, realloc, free.
* localtime.c (getzname, getqzname, leaps_thru_end_of, transtime):
* zdump.c (delta, yeartot):
* zic.c (eitol):
Now pure.
* private.h, zdump.c (ATTRIBUTE_PURE): New macro.
* private.h (icalloc, imalloc, irealloc, icfree, ifree): Remove decls.
* zic.c: Remove no-longer-necessary forward decls.
(max_time, min_time): Now const.
(setboundaries): Remove.
2012-10-12 07:53:12 -07:00
Paul Eggert 66f0c30ddc Release tzdata2012f.
* Makefile (VERSION): Increase to 2012f.
2012-09-12 23:17:03 -07:00
Paul Eggert 7550cb98da Fiji change for 2012/13, plus guess the future is similar. 2012-08-31 06:27:35 -07:00
Paul Eggert 11f660a42c Fix typo: simplifes -> simplifies. Thanks to Jonathan Leffler in
<http://mm.icann.org/pipermail/tz/2012-August/018236.html>.
2012-08-31 06:00:04 -07:00
Paul Eggert 60e612c3f4 Release tzcode2012e and tzdata2012e.
* Makefile (VERSION): Increase to 2012e.
2012-08-02 20:44:55 -07:00
Paul Eggert 33232258ad Use a single version number for both code and data.
* Makefile (VERSION): New macro, superseding ...
(TZCODE_VERSION, TZDATA_VERSION): Remove.  All uses changed.
(version.h): Call the variable TZVERSION, not TZCODE_VERSION.
All uses changed.
(tzselect): Interpolate TZVERSION, not TZCODE_VERSION.
(public): Adjust to new versioning scheme.
* tzselect.ksh (TZVERSION): Rename from TZCODE_VERSION.
* zdump.c, zic.c (main): Use TZVERSION, not TZCODE_VERSION.
2012-07-25 07:46:06 -07:00
Paul Eggert e785904cd0 * .gitignore: New file. 2012-07-25 07:41:07 -07:00
Paul Eggert dddafcdceb * australasia (Pacific/Fakaofo): Tokelau is UTC+13, not UTC+14.
Assume Shanks & Pottenger have been wrong by an hour since 1901.
Reported by Steffen Thorsen in
<http://mm.icann.org/pipermail/tz/2012-July/018168.html>.
2012-07-25 07:40:15 -07:00
Paul Eggert 369851954c Remove trailing white space. 2012-07-25 07:13:46 -07:00
Paul Eggert ee42236d51 Release tzcode2012c and tzdata2012d.
* Makefile (TZCODE_VERSION): Increase to tzcode2012c.
(TZDATA_VERSION, GNUTARFLAGS, TARFLAGS, GZIPFLAGS): New macros.
(maintainer-clean): Remove all the old tar.gz files.
(set-timestamps): New rule.
(public): Use it.  Create distribution files that are more
reproducible, by omitting irrelevant information such as the time
of checkout or build, the builder's user name, the builder's
locale, and so forth.  Be more careful about file permissions in /tmp.
2012-07-19 16:35:33 -07:00
Paul Eggert 56e58fea6f Remove more files not properly removed. 2012-07-18 23:07:02 -07:00
Paul Eggert 2dab5617e5 Remove files not properly removed by SCCS-to-git translation. 2012-07-18 22:59:39 -07:00