1
/* Copyright (C) 2004 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
22
This file is based on public domain code from ftp://elsie.ncih.nist.gov/
18
23
Initial source code is in the public domain, so clarified as of
19
1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
24
1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
34
39
#define TZ_MAGIC "TZif"
37
uchar tzh_magic[4]; /* TZ_MAGIC */
38
uchar tzh_reserved[16]; /* reserved for future use */
39
uchar tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
40
uchar tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
41
uchar tzh_leapcnt[4]; /* coded number of leap seconds */
42
uchar tzh_timecnt[4]; /* coded number of transition times */
43
uchar tzh_typecnt[4]; /* coded number of local time types */
44
uchar tzh_charcnt[4]; /* coded number of abbr. chars */
42
unsigned char tzh_magic[4]; /* TZ_MAGIC */
43
unsigned char tzh_reserved[16]; /* reserved for future use */
44
unsigned char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
45
unsigned char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
46
unsigned char tzh_leapcnt[4]; /* coded number of leap seconds */
47
unsigned char tzh_timecnt[4]; /* coded number of transition times */
48
unsigned char tzh_typecnt[4]; /* coded number of local time types */
49
unsigned char tzh_charcnt[4]; /* coded number of abbr. chars */
48
53
. . .followed by. . .
50
55
tzh_timecnt (char [4])s coded transition times a la time(2)
51
56
tzh_timecnt (unsigned char)s types of local time starting at above
52
57
tzh_typecnt repetitions of
57
62
tzh_leapcnt repetitions of
58
63
one (char [4]) coded leap second transition times
59
64
one (char [4]) total correction after above
60
tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition
61
time is standard time, if FALSE,
65
tzh_ttisstdcnt (char)s indexed by type; if true, transition
66
time is standard time, if false,
62
67
transition time is wall clock time
63
68
if absent, transition times are
64
69
assumed to be wall clock time
65
tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition
66
time is UTC, if FALSE,
70
tzh_ttisgmtcnt (char)s indexed by type; if true, transition
71
time is UTC, if false,
67
72
transition time is local time
68
73
if absent, transition times are
69
74
assumed to be local time