Commit Graph

313 Commits

Author SHA1 Message Date
christos
33d9f9e08d Welcome to tzcode 2013e:
Changes affecting API

    The 'zic' command now outputs a dummy transition when far-future
    data can't be summarized using a TZ string, and uses a 402-year
    window rather than a 400-year window.  For the current data, this
    affects only the Asia/Tehran file.  It does not affect any of the
    time stamps that this file represents, so zdump outputs the same
    information as before.  (Thanks to Andrew Main (Zefram).)

    The 'date' command has a new '-r' option, which lets you specify
    the integer time to display, a la FreeBSD.

    The 'tzselect' command has two new options '-c' and '-n', which lets you
    select a zone based on latitude and longitude.

    The 'zic' command's '-v' option now warns about constructs that
    require the new version-3 binary file format.  (Thanks to Arthur
    David Olson for the suggestion.)

    Support for floating-point time_t has been removed.
    It was always dicey, and POSIX no longer requires it.
    (Thanks to Eric Blake for suggesting to the POSIX committee to
    remove it, and thanks to Alan Barrett, Clive D.W. Feather, Andy
    Heninger, Arthur David Olson, and Alois Treindl, for reporting
    bugs and elucidating some of the corners of the old floating-point
    implementation.)

    The signatures of 'offtime', 'timeoff', and 'gtime' have been
    changed back to the old practice of using 'long' to represent UT
    offsets.  This had been inadvertently and mistakenly changed to
    'int_fast32_t'.  (Thanks to Christos Zoulos.)

    The code avoids undefined behavior on integer overflow in some
    more places, including gmtime, localtime, mktime and zdump.

  Changes affecting the zdump utility

    zdump now outputs "UT" when referring to Universal Time, not "UTC".
    "UTC" does not make sense for time stamps that predate the introduction
    of UTC, whereas "UT", a more-generic term, does.  (Thanks to Steve Allen
    for clarifying UT vs UTC.)

  Data changes affecting behavior of tzselect and similar programs

    Country code BQ is now called the more-common name "Caribbean Netherlands"
    rather than the more-official "Bonaire, St Eustatius & Saba".

    Remove from zone.tab the names America/Montreal, America/Shiprock,
    and Antarctica/South_Pole, as they are equivalent to existing
    same-country-code zones for post-1970 time stamps.  The data for
    these names are unchanged, so the names continue to work as before.

  Changes affecting code internals

    zic -c now runs way faster on 64-bit hosts when given large numbers.

    zic now uses vfprintf to avoid allocating and freeing some memory.

    tzselect now computes the list of continents from the data,
    rather than have it hard-coded.

    Minor changes pacify GCC 4.7.3 and GCC 4.8.1.

  Changes affecting the build procedure

    The 'leapseconds' file is now generated automatically from a
    new file 'leap-seconds.list', which is a copy of
    <ftp://time.nist.gov/pub/leap-seconds.list>.
    A new source file 'leapseconds.awk' implements this.
    The goal is simplification of the future maintenance of 'leapseconds'.

    When building the 'posix' or 'right' subdirectories, if the
    subdirectory would be a copy of the default subdirectory, it is
    now made a symbolic link if that is supported.  This saves about
    2 MB of file system space.

    The links America/Shiprock and Antarctica/South_Pole have been
    moved to the 'backward' file.  This affects only nondefault builds
    that omit 'backward'.

  Changes affecting documentation and commentary

    Changes to the 'tzfile' man page

      It now mentions that the binary file format may be extended in
      future versions by appending data.

      It now refers to the 'zdump' and 'zic' man pages.

    Changes to the 'zic' man page

      It lists conditions that elicit a warning with '-v'.

      It says that the behavior is unspecified when duplicate names
      are given, or if the source of one link is the target of another.

      Its examples are updated to match the latest data.

      The definition of white space has been clarified slightly.
      (Thanks to Michael Deckers.)

    Changes to the 'Theory' file

      There is a new section about the accuracy of the tz database,
      describing the many ways that errors can creep in, and
      explaining why so many of the pre-1970 time stamps are wrong or
      misleading (thanks to Steve Allen, Lester Caine, and Garrett
      Wollman for discussions that contributed to this).

      The 'Theory' file describes LMT better (this follows a
      suggestion by Guy Harris).

      It refers to the 2013 edition of POSIX rather than the 2004 edition.

      It's mentioned that excluding 'backward' should not affect the
      other data, and it suggests at least one zone.tab name per
      inhabited country (thanks to Stephen Colebourne).

      Some longstanding restrictions on names are documented, e.g.,
      'America/New_York' precludes 'America/New_York/Bronx'.

      It gives more reasons for the 1970 cutoff.

      It now mentions which time_t variants are supported, such as
      signed integer time_t.  (Thanks to Paul Goyette for reporting
      typos in an experimental version of this change.)

      (Thanks to Philip Newton for correcting typos in these changes.)

    Documentation and commentary is more careful to distinguish UT in
    general from UTC in particular.  (Thanks to Steve Allen.)

    Add a better source for the Zurich 1894 transition.
    (Thanks to Pierre-Yves Berger.)

    Update shapefile citations in tz-link.htm.  (Thanks to Guy Harris.)
2013-09-20 19:06:54 +00:00
christos
aef0332e31 CID 1060853: Negative array index read (REVERSE_NEGATIVE) 2013-08-06 05:48:39 +00:00
joerg
49cecb845d Don't depend on implicit rounding from non-integral float constant. 2013-07-30 15:30:37 +00:00
msaitoh
56e70cb375 Both increment_overflow() and normalize_overflow() have two different
declarations. One must be *32(). Fixes compile error observed on sparc64.
2013-07-22 04:55:09 +00:00
christos
2361750063 remove "register" in new code
fix backwards check for overflow
2013-07-17 23:09:26 +00:00
christos
a37624b5b0 welcome to 2013d 2013-07-17 20:13:04 +00:00
joerg
e0ac190e1e Provide explicit LC_C_LOCALE accessor and drop the various NULL checks.
Provide LC_GLOBAL_LOCALE in a way that works with all locale functions.
Merge constant data used by the initial global locale and the C locale.
Drop function call layer for _current_locale() and directly return the
locale reference, not a pointer to it. Use protected access for global
variables, so that libc references can avoid the GOT overhead.
2013-05-17 12:55:56 +00:00
christos
f50e99db7e welcome to 2013c! 2013-05-08 15:49:43 +00:00
joerg
99fac95b50 Store time-specific locale data directly in the locale.
Ad dstrftime_l, strftime_lz and strptime_l.
2013-04-21 17:45:46 +00:00
christos
e2fcd4fa37 apply 2013b 2013-03-16 00:59:14 +00:00
christos
ca46014bf8 Overly aggressive long->zic_t conversion.
I should add zic_t to the dictionary instead.
2013-03-06 18:40:19 +00:00
christos
5828353b59 change %ld to %jd 2013-03-06 18:21:18 +00:00
christos
09953b1d89 - change zic_t to intmax_t and friends suggested by apb
- change long to zic_t suggested by Paul Eggert
- remove unused constants
2013-03-06 18:19:07 +00:00
joerg
bd48a85600 usage is dead. 2013-03-04 21:18:51 +00:00
christos
94b98e2733 but don't lose our own extensions 2013-03-02 21:56:28 +00:00
christos
79072b5545 use correct types. 2013-03-02 21:39:48 +00:00
christos
6e1e799722 resolve more diff 2013-03-02 21:28:06 +00:00
christos
ca5a334915 update to tzcode2013a 2013-03-02 21:24:28 +00:00
christos
0465120426 include private.h to get access to TM_GMTOFF 2013-01-31 15:47:53 +00:00
apb
1a0c3376f6 Document the fact that ctime_rz, localtime_rz, and mktime_z,
accept a NULL timezone_t pointer as a reference to UTC,
and the fact that tzalloc accepts a NULL zone name.
2013-01-19 11:56:17 +00:00
uwe
6acbdc7985 And two more pastos in examples: December and January are in standard EST,
not daylight saving EDT.
2012-12-14 23:26:17 +00:00
uwe
367bc13515 Fix two more pastos in examples. 2012-12-14 23:16:11 +00:00
uwe
8cc39c0c9f Fix pasto in example template. 2012-12-14 23:00:21 +00:00
uwe
4636daa9fd Use .Vt for types. Don't use .Pq - it formats funny in PostScript and
plain parens do just fine here.
2012-12-14 22:57:00 +00:00
uwe
0c65b28c80 Fix table formatting. 2012-12-14 22:33:17 +00:00
khorben
fa46f3adf7 Fixed a typo within the examples 2012-12-14 22:22:51 +00:00
christos
fb6139e643 add a cast to appease the compat build. 2012-10-28 19:02:29 +00:00
christos
2f573b07f7 welcome to tzcode2012h via patch. 2012-10-28 17:11:33 +00:00
christos
7d8ba7bfb5 stronger lint foo 2012-10-26 23:23:23 +00:00
christos
4295620388 - whitespace
- s/consttmp/const tmp/
- sync comments
- don't save errno where it is not needed
- consistent lint comments
2012-10-26 18:31:14 +00:00
christos
4c9b20d676 consistent lint commments 2012-10-26 18:30:11 +00:00
christos
11571e6e08 remove unused constant 2012-10-26 18:29:49 +00:00
christos
a8bd22430c remove register 2012-10-26 18:29:34 +00:00
martin
a5430d17c3 Revert previous - casting to long is a bad idea, as the value will overflow.
Pointed out by apb.
2012-10-25 15:04:05 +00:00
martin
f5962309a9 Add a few casts to avoid (IMHO bogus) gcc warnings breaking the vax build. 2012-10-25 13:14:32 +00:00
christos
0b25fef287 remove error(1) output. 2012-10-24 00:30:52 +00:00
christos
fb0d3fd558 apply 2012g via patch 2012-10-24 00:10:03 +00:00
christos
b6be6961a7 merge 2012e 2012-08-09 12:38:25 +00:00
abs
9e66e6d75e Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
2012-06-25 22:32:43 +00:00
wiz
5eee512564 Fix typo, from Bug Hunting. 2012-04-06 11:35:39 +00:00
matt
44551472c9 Remove use of __P
Switch to using C89 definitions.
2012-03-20 16:38:44 +00:00
christos
c5e820cae4 PR/45989: Martin Husemann: lint invocation does include -w only on i386
- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
  would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
  builds)

approved by core@
2012-03-13 21:13:30 +00:00
shattered
aaf49ded47 Xref zdump(8). OK by wiz@ 2012-02-25 10:56:52 +00:00
martin
f989e55d57 Do not force errno to EOVERFLOW when returning -1 from mktime or friends.
First, there are legitimate cases where we want to return -1 and errno == 0,
second, all paths go through time1() and/or time2sub() which explicitly
take care to set errno in cases of real overflows.
Should fix atf test failure on various ports in
lib/libc/time/t_mktime:timegm_epoch.
2012-01-07 15:19:35 +00:00
christos
788c275de8 Change the way that we compute the time when we fall in the dst gap: instead
of supplying just the high bound and thus losing minutes and seconds, add
the DST offset to the struct tm (since we know we are going to move ahead
since we fell in the gap), and try again.
2011-11-08 18:37:31 +00:00
christos
0d371217b3 no need to adjust the off, hi is already at the right time. 2011-11-07 19:42:03 +00:00
christos
672226e183 document where tm_zone comes from in the _z calls. 2011-11-02 23:06:08 +00:00
apb
6a9c6d1ff5 Use double quotes to prevent multiple adjacent spaces from
being squashed to a single space on output.
2011-11-02 19:59:40 +00:00
christos
b94db0ddf1 Only advance the time if we are skipping the gap. 2011-10-28 21:51:06 +00:00
christos
31b34eee08 prevent underflow from giving us a false positive test in the first iteration. 2011-10-28 13:53:06 +00:00