mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 14:00:30 +00:00
1b171c942e
Sync tzselect, zdump, zic to TZDB 2024b. This patch incorporates the following TZDB source code changes: 6903dde3 Release 2024b 812aff32 Improve historical transitions in Mexico 1921-1997 52662566 Adjust to mailing list software change 7748036b Mention Internet RFC 9557 339e81d1 Mention Levine’s proposal to replace leap seconds b4e6ad2d No leap second on 2024-12-31 7eb5bf88 Asia/Choibalsan is now an alias for Asia/Ulaanbaatar 43450cbf Improve historical data for Portugal and former possessions. 13d7348b Typo and validation fixes. 3c39cde8 Fix typo for “removed” in a comment 03fd9e45 More documentation updates for POSIX.1-2024 eb3bcceb POSIX.1-2014 is now published 913b0410 tzselect: support POSIX.1-2024 offset range b5318b55 Document POSIX.1-2024 better 837609b7 Fix typo when making .txt man pages d56ae6ee SUPPORT_C89 now defaults to 1, not 0 b1fe113d Port ! to Solaris make 8f1fd321 Avoid crash in Solaris 10 /usr/xpg4/bin/make e0fcfdd6 Use ‘export VAR=VAL’ syntax eba43166 Avoid an awk invocation via $'...' 36479a80 Avoid some subshells in tzselect 7f6cf054 * tzselect.ksh: Assume POSIX.2 awk. a1cf1daf * tzselect.ksh: Assume POSIX.2 $PWD. a9b8e536 Assume POSIX.2 command substitution eaa4ef16 Avoid subshells when possible 9dac9eb7 Prefer $PWD to $(pwd) in Makefile fada6a4c Prefer $(CMD) to `CMD` in Makefile 3e871b9a Assume POSIX.2 and eschew ‘expr’ c5d67805 difftime isn’t pure either 5857c056 * CONTRIBUTING: Document build assumptions. 6822cc82 ‘make check’ no longer depends on curl+Internet cc6eb255 Document GCC bug 114833 and workaround bcbc86bf Scale back on function attribute use c0789e46 C23 [[reproducible]] and [[unsequenced]] fixups bbd88154 More updates to GCC_DEBUG_FLAGS for GCC 14 1a35b7c8 Spelling fixes f71085f2 POSIX.1-2024 removes asctime_r, ctime_r 70856f8e Adjust to refactored location of ctime, ctime_r aacd151d Update GCC_DEBUG_FLAGS for GCC 14 967dcf3b Sub-second history for Maputo and Zurich 782d0826 Make EET, MET and WET links a0b09c02 Mark CET, CST6CDT etc. as obsolescent db7fb40d Document SMPTE timecodes and rolling leaps 97232e18 Don’t be so sure about leap seconds going away 5b6a74fb Update some URLs a75a6251 * zic.8: Tweak for consistency. 1e75b31f Document what %s means before any rule applies 00c96cbb Conform to RFC 8536 section 3.2 for default type 3e944959 Document problems with stripped-down TZif readers 20fc91cf Shanks is likely wrong about Maputo switch to CAT d99589b6 * zic.8: Add missing tab character. 94e6b3b0 Switch to %z in main dataform 2cd57b93 Treat W-Eur like Port when reguarding ad6f6d94 Check that main.zi agrees with sources a43b030f .gitignore: Add .pdf, .ps, .s. Remove obsolete ‘yearistype’. 253ca020 * theory.html: ‘CLT’ → ‘LTC’ (per Michael H Deckers) a3dee8c8 * NEWS: ‘how’ → ‘now’ (thanks to Paul Goyette). ea6341c5 * theory.html: Mention NASA and CLT (per Arthur David Olson). 0dcebe37 America/Scoresbysund matches America/Nuuk from now on b1e07fb0 Update Vzic link (thanks to Allen Winter) a4b05030 Fix wday/mday typo in previous patch 732a4803 Document how to detect mktime failure reliably a64067e9 ziguard.awk: generalize for proposed Portugal patch 59c861fd Line up zdump examples 66c106c9 tzfile.5: srcfix e5553001 Fix .RS/.RE problem in tzfile.5 d647eb01 Add Doctorow book 59d4a1ba Asia/Almaty matches Asia/Tashkent from now on d4d3c3ba * asia: Update Philippine URLs (thanks to Guy Harris). 9fc11a27 Port unlikely overflow check to C23 b52a2969 Fix 2023d NEWS typo e48c5b53 Cite "The NTP Leap Second File" b1dc2122 Update Israel tz-link 6cf4e912 Extrapolate less from the 2022 CGPM resolution. It fixes glibc build with gcc master [1]. Checked on x86_64-linux-gnu and on i686-linux-gnu. [1] https://sourceware.org/pipermail/libc-alpha/2024-September/159571.html Reviewed-by: Paul Eggert <eggert@cs.ucla.edu>
122 lines
4.1 KiB
C
122 lines
4.1 KiB
C
/* Layout and location of TZif files. */
|
|
|
|
#ifndef TZFILE_H
|
|
|
|
#define TZFILE_H
|
|
|
|
/*
|
|
** This file is in the public domain, so clarified as of
|
|
** 1996-06-05 by Arthur David Olson.
|
|
*/
|
|
|
|
/*
|
|
** This header is for use ONLY with the time conversion code.
|
|
** There is no guarantee that it will remain unchanged,
|
|
** or that it will remain at all.
|
|
** Do NOT copy it to any system include directory.
|
|
** Thank you!
|
|
*/
|
|
|
|
/*
|
|
** Information about time zone files.
|
|
*/
|
|
|
|
#ifndef TZDEFRULES
|
|
# define TZDEFRULES "posixrules"
|
|
#endif /* !defined TZDEFRULES */
|
|
|
|
|
|
/* See Internet RFC 8536 for more details about the following format. */
|
|
|
|
/*
|
|
** Each file begins with. . .
|
|
*/
|
|
|
|
#define TZ_MAGIC "TZif"
|
|
|
|
struct tzhead {
|
|
char tzh_magic[4]; /* TZ_MAGIC */
|
|
char tzh_version[1]; /* '\0' or '2'-'4' as of 2021 */
|
|
char tzh_reserved[15]; /* reserved; must be zero */
|
|
char tzh_ttisutcnt[4]; /* coded number of trans. time flags */
|
|
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
|
|
char tzh_leapcnt[4]; /* coded number of leap seconds */
|
|
char tzh_timecnt[4]; /* coded number of transition times */
|
|
char tzh_typecnt[4]; /* coded number of local time types */
|
|
char tzh_charcnt[4]; /* coded number of abbr. chars */
|
|
};
|
|
|
|
/*
|
|
** . . .followed by. . .
|
|
**
|
|
** tzh_timecnt (char [4])s coded transition times a la time(2)
|
|
** tzh_timecnt (unsigned char)s types of local time starting at above
|
|
** tzh_typecnt repetitions of
|
|
** one (char [4]) coded UT offset in seconds
|
|
** one (unsigned char) used to set tm_isdst
|
|
** one (unsigned char) that's an abbreviation list index
|
|
** tzh_charcnt (char)s '\0'-terminated zone abbreviations
|
|
** tzh_leapcnt repetitions of
|
|
** one (char [4]) coded leap second transition times
|
|
** one (char [4]) total correction after above
|
|
** tzh_ttisstdcnt (char)s indexed by type; if 1, transition
|
|
** time is standard time, if 0,
|
|
** transition time is local (wall clock)
|
|
** time; if absent, transition times are
|
|
** assumed to be local time
|
|
** tzh_ttisutcnt (char)s indexed by type; if 1, transition
|
|
** time is UT, if 0, transition time is
|
|
** local time; if absent, transition
|
|
** times are assumed to be local time.
|
|
** When this is 1, the corresponding
|
|
** std/wall indicator must also be 1.
|
|
*/
|
|
|
|
/*
|
|
** If tzh_version is '2' or greater, the above is followed by a second instance
|
|
** of tzhead and a second instance of the data in which each coded transition
|
|
** time uses 8 rather than 4 chars,
|
|
** then a POSIX.1-2017 proleptic TZ string for use in handling
|
|
** instants after the last transition time stored in the file
|
|
** (with nothing between the newlines if there is no POSIX.1-2017
|
|
** representation for such instants).
|
|
**
|
|
** If tz_version is '3' or greater, the TZ string can be any POSIX.1-2024
|
|
** proleptic TZ string, which means the above is extended as follows.
|
|
** First, the TZ string's hour offset may range from -167
|
|
** through 167 as compared to the range 0 through 24 required
|
|
** by POSIX.1-2017 and earlier.
|
|
** Second, its DST start time may be January 1 at 00:00 and its stop
|
|
** time December 31 at 24:00 plus the difference between DST and
|
|
** standard time, indicating DST all year.
|
|
*/
|
|
|
|
/*
|
|
** In the current implementation, "tzset()" refuses to deal with files that
|
|
** exceed any of the limits below.
|
|
*/
|
|
|
|
#ifndef TZ_MAX_TIMES
|
|
/* This must be at least 242 for Europe/London with 'zic -b fat'. */
|
|
# define TZ_MAX_TIMES 2000
|
|
#endif /* !defined TZ_MAX_TIMES */
|
|
|
|
#ifndef TZ_MAX_TYPES
|
|
/* This must be at least 18 for Europe/Vilnius with 'zic -b fat'. */
|
|
# define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
|
|
#endif /* !defined TZ_MAX_TYPES */
|
|
|
|
#ifndef TZ_MAX_CHARS
|
|
/* This must be at least 40 for America/Anchorage. */
|
|
# define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */
|
|
/* (limited by what unsigned chars can hold) */
|
|
#endif /* !defined TZ_MAX_CHARS */
|
|
|
|
#ifndef TZ_MAX_LEAPS
|
|
/* This must be at least 27 for leap seconds from 1972 through mid-2023.
|
|
There's a plan to discontinue leap seconds by 2035. */
|
|
# define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */
|
|
#endif /* !defined TZ_MAX_LEAPS */
|
|
|
|
#endif /* !defined TZFILE_H */
|