freebsd-src/contrib/tzcode
Dag-Erling Smørgrav a38c2f99f8 tzcode: Fix early tz change detection
Assume tzdata is not fresh if last_checked is zero, as comparing the
current time to last_checked less than __tz_change_interval after boot
may produce a false negative.

While here, invert the return value from tzdata_is_fresh() to better
match its new name (it was previously called recheck_tzdata(), so zero
for fresh and non-zero for stale made sense, but it doesn't now).

PR:		269207
MFC after:	3 days
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D53502
2025-11-02 14:51:42 +01:00
..
asctime.c tzcode: Drop libc namespace 2025-09-27 19:07:15 +02:00
calendars
CONTRIBUTING Update tzcode to 2024b. 2024-09-07 15:46:13 +02:00
date.1 Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
date.c Update tzcode to 2023c. 2023-04-26 11:46:21 +02:00
difftime.c tzcode: Drop libc namespace 2025-09-27 19:07:15 +02:00
LICENSE
localtime.c tzcode: Fix early tz change detection 2025-11-02 14:51:42 +01:00
Makefile Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
newctime.3 Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
NEWS Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
newstrftime.3 Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
newtzset.3 Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
private.h tzcode: Expose and document offtime() and offtime_r() 2025-09-23 21:38:49 +02:00
README Update tzcode to 2024a. 2024-02-13 21:31:41 +01:00
SECURITY
strftime.c Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
theory.html Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
time2posix.3 Update tzcode to 2023c. 2023-04-26 11:46:21 +02:00
tz-art.html Update tzcode to 2024b. 2024-09-07 15:46:13 +02:00
tz-how-to.html Update tzcode to 2023c. 2023-04-26 11:46:21 +02:00
tz-link.html Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
tzconfig.h timezone: Move to the XSI/POSIX definition for timezone. 2024-03-11 22:19:31 -06:00
tzdir.h Update tzcode to 2024a. 2024-02-13 21:31:41 +01:00
tzfile.5 Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
tzfile.h Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
tzselect.8 Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
tzselect.ksh Update tzcode to 2024b. 2024-09-07 15:46:13 +02:00
version Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
version.h
workman.sh Update tzcode to 2024b. 2024-09-07 15:46:13 +02:00
zdump.8 Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
zdump.c Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
zic.8 Update tzcode to 2025b 2025-08-27 20:40:09 +02:00
zic.c Update tzcode to 2025b 2025-08-27 20:40:09 +02:00

README for the tz distribution

"Where do I set the hands of the clock?" -- Les Tremayne as The King
"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist
					(from the Bell System film "About Time")

The Time Zone Database (called tz, tzdb or zoneinfo) contains code and
data that represent the history of local time for many representative
locations around the globe.  It is updated periodically to reflect
changes made by political bodies to time zone boundaries, UTC offsets,
and daylight-saving rules.

See <https://www.iana.org/time-zones/repository/tz-link.html> or the
file tz-link.html for how to acquire the code and data.

Once acquired, read the leading comments in the file "Makefile"
and make any changes needed to make things right for your system,
especially when using a platform other than current GNU/Linux.

Then run the following commands, substituting your desired
installation directory for "$HOME/tzdir":

	make TOPDIR="$HOME/tzdir" install
	"$HOME/tzdir/usr/bin/zdump" -v America/Los_Angeles

See the file tz-how-to.html for examples of how to read the data files.

This database of historical local time information has several goals:

 * Provide a compendium of data about the history of civil time that
   is useful even if not 100% accurate.

 * Give an idea of the variety of local time rules that have existed
   in the past and thus may be expected in the future.

 * Test the generality of the local time rule description system.

The information in the time zone data files is by no means authoritative;
fixes and enhancements are welcome.  Please see the file CONTRIBUTING
for details.

Thanks to these Time Zone Caballeros who've made major contributions to the
time conversion package: Keith Bostic; Bob Devine; Paul Eggert; Robert Elz;
Guy Harris; Mark Horton; John Mackin; and Bradley White.  Thanks also to
Michael Bloom, Art Neilson, Stephen Prince, John Sovereign, and Frank Wales
for testing work, and to Gwillim Law for checking local mean time data.
Thanks in particular to Arthur David Olson, the project's founder and first
maintainer, to whom the time zone community owes the greatest debt of all.
None of them are responsible for remaining errors.

-----

This file is in the public domain, so clarified as of 2009-05-17 by
Arthur David Olson.  The other files in this distribution are either
public domain or BSD licensed; see the file LICENSE for details.