Changes to code
zic now accepts subsecond precision in expressions like
00:19:32.13, which is approximately the legal time of the
Netherlands from 1835 to 1937. However, because it is
questionable whether the few recorded uses of non-integer offsets
had subsecond precision in practice, there are no plans for tzdata
to use this feature. (Thanks to Steve Allen for pointing out
the limitations of historical data in this area.)
The code is a bit more portable to MS-Windows. Installers can
compile with -DRESERVE_STD_EXT_IDS on MS-Windows platforms that
reserve identifiers like 'localtime'. (Thanks to Manuela
Friedrich).
Changes to documentation and commentary
theory.html now outlines tzdb's extensions to POSIX's model for
civil time, and has a section "POSIX features no longer needed"
that lists POSIX API components that are now vestigial.
(From suggestions by Steve Summit.) It also better distinguishes
time zones from tz regions. (From a suggestion by Guy Harris.)
Commentary is now more consistent about using the phrase "daylight
saving time", to match the C name tm_isdst. Daylight saving time
need not occur in summer, and need not have a positive offset from
standard time.
Commentary about historical transitions in Uruguay has been expanded
with links to many relevant legal documents.
(Thanks to Tim Parenti.)
Commentary now uses some non-ASCII characters with Unicode value
less than U+0100, as they can be useful and should work even with
older editors such as XEmacs.
The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.
Add asctime to namespace.h.
Register a new __weak_alias() entry for asctime() in asctime.c.
acstime() is used internally in ctime and __ctime50. This revision switches
the internal usage to the internal symbol.
Sponsored by <The NetBSD Foundation>
zic and the reference runtime now reject multiple leap seconds
within 28 days of each other, or leap seconds before the Epoch.
As a result, support for double leap seconds, which was
obsolescent and undocumented, has been removed. Double leap
seconds were an error in the C89 standard; they have never existed
in civil timekeeping. (Thanks to Robert Elz and Bradley White for
noticing glitches in the code that uncovered this problem.)
zic now warns about use of the obsolescent and undocumented -y
option, and about use of the obsolescent TYPE field of Rule lines.
zic now allows unambiguous abbreviations like "Sa" and "Su" for
weekdays; formerly it rejected them due to a bug. Conversely, zic
no longer considers non-prefixes to be abbreviations; for example,
it no longer accepts "lF" as an abbreviation for "lastFriday".
Also, zic warns about the undocumented usage with a "last-"
prefix, e.g., "last-Fri".
Similarly, zic now accepts the unambiguous abbreviation "L" for
"Link" in ordinary context and for "Leap" in leap-second context.
Conversely, zic no longer accepts non-prefixes such as "La" as
abbreviations for words like "Leap".
zic no longer accepts leap second lines in ordinary input, or
ordinary lines in leap second input. Formerly, zic sometimes
warned about this undocumented usage and handled it incorrectly.
The new macro HAVE_TZNAME governs whether the tzname external
variable is exported, instead of USG_COMPAT. USG_COMPAT now
governs only the external variables "timezone" and "daylight".
This change is needed because the three variables are not in the
same category: although POSIX requires tzname, it specifies the
other two variables as optional. Also, USG_COMPAT is now 1 or 0:
if not defined, the code attempts to guess it from other macros.
localtime.c and difftime.c no longer require stdio.h, and .c files
other than zic.c no longer require sys/wait.h.
zdump.c no longer assumes snprintf. (Reported by Jonathan Leffler.)
Calculation of time_t extrema works around a bug in GCC 4.8.4
(Reported by Stan Shebs and Joseph Myers.)
zic.c no longer mistranslates formats of line numbers in non-English
locales. (Problem reported by Benno Schulenberg.)
Several minor changes have been made to the code to make it a
bit easier to port to MS-Windows and Solaris. (Thanks to Kees
Dekker for reporting the problems.)
Changes to documentation and commentary
The two new files 'theory.html' and 'calendars' contain the
contents of the removed file 'Theory'. The goal is to document
tzdb theory more accessibly.
The zic man page now documents abbreviation rules.
tz-link.htm now covers how to apply tzdata changes to clients.
(Thanks to Jorge Fábregas for the AIX link.) It also mentions MySQL.
The leap-seconds.list URL has been updated to something that is
more reliable for tzdb. (Thanks to Tim Parenti and Brian Inglis.)
- now understands 64bit time_t and 64bit data in timezone files.
- localtime(), gmtime(), asctime() and ctime() may now fail with
a NULL result if time_t cannot be represented by struct tm.
suppose they were legal before, but lint was unhappy about them. It
was probably unhappy for the wrong reasons, but I think it certainly
wasn't something one would want anyway. Declaring a string of length
three to have storage of length three without room for the nul is
asking for trouble even if it does work in context, and there was no
reason not to state how many days there are in a week or months in a
year -- they aren't onerous and aren't going to change.
NOTE: If this code isn't being synced with the central TZCODE stuff,
it probably should be KNFed etc. It is full of K&R declarations,
register, lots of eccentricities, etc.