aboutsummaryrefslogtreecommitdiff
path: root/timezone/tzfile.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-12-20 13:10:07 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-12-20 13:10:07 +0000
commit85bff96ad652b463f83d4cf19239eff1535e186a (patch)
treed651b5e72fe828f47613e6813ac5d54b0b7aaf66 /timezone/tzfile.h
parentb7867a3bfb9d7e00204c088feb227abddfc7bb43 (diff)
downloadglibc-85bff96ad652b463f83d4cf19239eff1535e186a.tar
glibc-85bff96ad652b463f83d4cf19239eff1535e186a.tar.gz
glibc-85bff96ad652b463f83d4cf19239eff1535e186a.tar.bz2
glibc-85bff96ad652b463f83d4cf19239eff1535e186a.zip
Update timezone code from tzcode 2013i.
Now we have Paul's support for version-3 tz files checked in, this patch updates all the code we take (unmodified) from tzcode to version 2013i (which includes the support for generating version-3 tz files where necessary). Tested x86_64. * timezone/checktab.awk: Update from tzcode 2013i. * timezone/private.h: Likewise. * timezone/scheck.c: Likewise. * timezone/tzfile.h: Likewise. * timezone/tzselect.ksh: Likewise. * timezone/zdump.c: Likewise. * timezone/zic.c: Likewise.
Diffstat (limited to 'timezone/tzfile.h')
-rw-r--r--timezone/tzfile.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/timezone/tzfile.h b/timezone/tzfile.h
index 0f6c687f16..529650dd8a 100644
--- a/timezone/tzfile.h
+++ b/timezone/tzfile.h
@@ -39,7 +39,7 @@
struct tzhead {
char tzh_magic[4]; /* TZ_MAGIC */
- char tzh_version[1]; /* '\0' or '2' as of 2005 */
+ char tzh_version[1]; /* '\0' or '2' or '3' as of 2013 */
char tzh_reserved[15]; /* reserved--must be zero */
char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
@@ -55,7 +55,7 @@ struct tzhead {
** 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 UTC offset in seconds
+** 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
@@ -68,7 +68,7 @@ struct tzhead {
** if absent, transition times are
** assumed to be wall clock time
** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition
-** time is UTC, if FALSE,
+** time is UT, if FALSE,
** transition time is local time
** if absent, transition times are
** assumed to be local time
@@ -82,6 +82,13 @@ struct tzhead {
** instants after the last transition time stored in the file
** (with nothing between the newlines if there is no POSIX representation for
** such instants).
+**
+** If tz_version is '3' or greater, the above is extended as follows.
+** First, the POSIX TZ string's hour offset may range from -167
+** through 167 as compared to the POSIX-required 0 through 24.
+** 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.
*/
/*
@@ -94,16 +101,8 @@ struct tzhead {
#endif /* !defined TZ_MAX_TIMES */
#ifndef TZ_MAX_TYPES
-#ifndef NOSOLAR
+/* This must be at least 17 for Europe/Samara and Europe/Vilnius. */
#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
-#endif /* !defined NOSOLAR */
-#ifdef NOSOLAR
-/*
-** Must be at least 14 for Europe/Riga as of Jan 12 1995,
-** as noted by Earl Chew.
-*/
-#define TZ_MAX_TYPES 20 /* Maximum number of local time types */
-#endif /* !defined NOSOLAR */
#endif /* !defined TZ_MAX_TYPES */
#ifndef TZ_MAX_CHARS
@@ -122,7 +121,7 @@ struct tzhead {
#define DAYSPERNYEAR 365
#define DAYSPERLYEAR 366
#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
-#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
+#define SECSPERDAY ((int_fast32_t) SECSPERHOUR * HOURSPERDAY)
#define MONSPERYEAR 12
#define TM_SUNDAY 0