<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../../rfc2629.xslt"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'
[
<!ENTITY rfc0020 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.0020.xml'>
<!ENTITY rfc2119 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY rfc2045 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2045.xml'>
<!ENTITY rfc4833 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4833.xml'>
<!ENTITY rfc5545 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5545.xml'>
<!ENTITY rfc6557 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6557.xml'>
<!ENTITY rfc6838 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6838.xml'>
<!ENTITY rfc7231 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7231.xml'>
<!ENTITY rfc7808 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7808.xml'>
<!ENTITY rfc8174 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml'>
<!ENTITY rfc8446 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml'>
<!ENTITY ieee1003 PUBLIC ''
'http://xml2rfc.ietf.org/public/rfc/bibxml-ieee/reference.IEEE.1003.1_2013_EDITION.xml'>
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc tocdepth="3"?>
<?rfc strict="yes"?>
<rfc category="std" ipr='trust200902'
     submissionType='independent'
     docName='draft-murchison-tzdist-tzif-16'>
<!--     updates='7808'-->
  <front>
    <title abbrev="TZif">
      The Time Zone Information Format (TZif)
    </title>
    <author initials="A.D." surname="Olson"
            fullname="Arthur David Olson">
      <organization />
      <address>
        <email>arthurdavidolson@gmail.com</email>
      </address>
    </author>
    <author initials="P." surname="Eggert" fullname="Paul Eggert">
      <organization abbrev="UCLA">
        University of California, Los Angeles
      </organization>
      <address>
        <email>eggert@cs.ucla.edu</email>
      </address>
    </author>
    <author initials="K." surname="Murchison"
            fullname="Kenneth Murchison"> 
      <organization abbrev="FastMail">FastMail US LLC</organization>
      <address>
<!--
        <postal>
          <street>Level 2, 114 William Street</street>
          <city>Melbourne</city> <region>VIC</region>
          <code>3000</code> <country>Australia</country>
          </postal>
-->
        <email>murch@fastmailteam.com</email>
      </address>
    </author>

    <date />
    <area>ART</area>
    <workgroup>Independent Submission</workgroup>

    <keyword>time zone</keyword>
    <keyword>tzdata</keyword>
    <keyword>tzif</keyword>

    <abstract>
      <t>This document specifies the Time Zone Information Format (TZif)
      for representing and exchanging time zone information,
      independent of any particular service or protocol.
      Two MIME media types for this format are also defined.
      </t>
    </abstract>
<!--
    <note title='Open Issues'>
      <t>
        <list style='symbols'>
        </list>
      </t>
      </note>
-->
  </front>

  <middle>
    <section title='Introduction'>
      <t>Time zone data typically consists of offsets from Universal
      Time (UT), daylight saving transition rules, one or
      more local time designations (acronyms or abbreviations), and
      optional leap second adjustments.
      One such format for conveying this information is <xref
      target="RFC5545">iCalendar</xref>.  It is a text-based format
      used by calendaring and scheduling systems.
      </t>

      <t>This document specifies the widely deployed Time Zone
      Information Format (TZif).
      It is a binary format used by most UNIX systems to calculate
      local time.
      This format was introduced in the 1980s and has evolved since
      then into multiple upward-compatible versions.
      There is a wide variety of interoperable <xref
      target="tz-link">software</xref> capable of generating and
      reading files in this format.
      </t>

      <t>This specification does not define the source of the data
      assembled into a TZif file.
      One such source is the IANA-hosted time zone database <xref
      target="RFC6557" />.</t>
    </section>  <!-- Intro -->

    <section title='Conventions Used in This Document'>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
      NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
      "MAY", and "OPTIONAL" in this document are to be interpreted as
      described in <eref target="https://tools.ietf.org/html/bcp14">BCP 14</eref>
      <xref target='RFC2119' /> <xref target='RFC8174' /> 
      when, and only when, they appear in all capitals, as shown here.</t>

      <t>The following terms are used in this document
      (see <xref target="tz-link">"Sources for Time Zone and Daylight
      Saving Time Data"</xref> for more-detailed information about
      civil timekeeping data and practice):
	
      <list style="hanging">
        <t hangText="Coordinated Universal Time (UTC):">
          The basis for civil time since 1960.
          It is approximately equal to mean solar time at the prime
          meridian (0 degrees longitude).
        </t>
        <t hangText="Daylight Saving Time (DST):">
          The time according to a location's law or practice,
	  when adjusted as necessary from standard time.  The
	  adjustment may be positive or negative, and the amount of
	  adjustment may vary depending on the date and time; the TZif
	  format even allows the adjustment to be zero, although this
	  is not common practice.
        </t>
        <t hangText="International Atomic Time (TAI):">
          The time standard based on atomic clocks since 1972.
          It is equal to UTC except without leap second adjustments.
        </t>
	<t hangText="Leap Second Correction (LEAPCORR):">
	  The value of TAI - UTC - 10 for timestamps after the
	  first leap second, and zero for timestamps before that.
	  The expression "TAI - UTC - 10" comes from the fact
	  that TAI - UTC was defined to be 10 just prior to
	  the first leap second in 1972, so clocks with leap
	  seconds have a zero LEAPCORR before the first leap
	  second.
	</t>
        <t hangText="Local Time:">
	  Civil time for a particular location.  Its offset
	  from Universal Time can depend on the date and time of day.
        </t>
	<t hangText="POSIX Epoch:">
	  1970-01-01 00:00:00 UTC, the basis for absolute timestamps
	  in this document.
	</t>
        <t hangText="Standard Time:">
          The time according to a location's law or practice,
          unadjusted for Daylight Saving Time.
        </t>
        <t hangText="Time Change:">
          A change to civil timekeeping practice. It occurs when one
          or more of the following happen simultaneously:
          <list style="numbers">
            <t>a change in UT offset</t>
	    <t>a change in whether daylight saving time is in effect</t>
            <t>a change in time zone abbreviation</t>
	    <t>a leap second (i.e., a change in LEAPCORR)</t>
          </list>
        </t>
        <t hangText="Time Zone Data:">
          The <xref target="RFC7808">Time Zone Data Distribution
          Service (TZDIST)</xref> defines "Time zone data" as "data
          that defines a single time zone, including an identifier,
          UTC offset values, DST rules, and other information such as
          time zone abbreviations."  The interchange format defined in
          this document is one such form of time zone data.
        </t>
	<t hangText="Transition Time:">
	  The moment of occurrence of a time change that is not a leap
	  second.  It is identified with a signed integer count of
	  Unix Leap Time seconds since the POSIX Epoch.
	</t>
        <t hangText="Universal Time (UT):">
          The basis of civil time.
          This is the principal form of the mean solar time at the
          prime meridian (0 degrees longitude) for timestamps before
          UTC was introduced in 1960, and is UTC for timestamps
          thereafter.
          Although UT is sometimes called "UTC" or "GMT" in other
          sources, this specification uses the term "UT" to avoid
          confusion with UTC or with GMT.
        </t>
        <t hangText="UNIX Time:">
          The time as returned by the C time() function
          (see <eref
          target="http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html">
          Section 3 of the "System Interfaces" Volume</eref> of <xref
          target="POSIX"/>).  This is an integer number of seconds
	  since the POSIX Epoch, not counting
          leap seconds.  As an extension to POSIX, negative values
          represent times before the POSIX Epoch, using UT.
        </t>
	<t hangText="UNIX Leap Time:">
          UNIX time plus all preceding leap second corrections.
	  For example, if the first leap second record in a TZif file
          occurs at 1972-06-30 23:59:60 UTC, the UNIX leap time for
          the timestamp 1972-07-01 00:00:00 UTC would be 78796801, one
          greater than the UNIX time for the same timestamp.
          Similarly, if the second leap second record occurs at
	  1972-12-31 23:59:60 UTC it accounts for the first leap second,
	  so the UNIX leap time of 1972-12-31 23:59:60 UTC would be 94694401
	  and the Unix leap time of 1973-01-01 00:00:00 UTC would be 94694402.
	  If a TZif file specifies no leap second records,
	  UNIX leap time is equal to UNIX time.
	</t>
        <t hangText="Wall Time:">
	  Another name for local time; short for "wall clock time".
        </t>
      </list>
      </t>
    </section>  <!-- Conventions -->
    
    <section anchor='format'
             title='The Time Zone Information Format (TZif)'>
      <t>The time zone information format begins with a fixed 44-octet
      <xref target='header'>version 1 header</xref>
      containing a field that specifies the version
      of the file's format.  Readers designed for version N can read
      version N+1 files without too much trouble; data specific to
      version N+1 either appears after version N data so
      that earlier-version readers can easily ignore later-version
      data they are not designed for, or it appears as a minor
      extension to version N that version N readers are likely to
      tolerate well.</t>

      <t>The version 1 header is followed by a variable-length
      <xref target='data'>version 1 data block</xref> containing
      four-octet  (32-bit) transition times and leap second
      occurrences. These 32-bit values are limited to representing
      time changes from 1901-12-13 20:45:52 through 2038-01-19 03:14:07 UT,
      and the version 1 header and data block are present only for backward
      compatibility with obsolescent readers as discussed in
      <xref target='issues'>Common Interoperability Issues</xref>.</t>

      <t>Version 1 files terminate after the version 1 data block.
      Version 2 and 3 files extend the format by appending a second
      44-octet version 2+ header, a variable-length version 2+ data block
      containing eight-octet (64-bit) transition times and leap second
      occurrences, and a variable length
      <xref target='footer'>footer</xref>.  
      These 64-bit values can represent times approximately 292
      billion years into the past or future.</t>

      <t>
	NOTE: All multi-octet integer values MUST be stored in
	network octet order format (high-order octet first, otherwise
	known as big-endian), with all bits significant. Signed
	integer values MUST be represented using two's complement.
      </t>

      <t>A TZif file is structured as follows:</t>

      <figure title='General Format of TZif Files'>
        <artwork type='inline' align='center'><![CDATA[
   Version 1       Versions 2 & 3
+-------------+   +-------------+
|  Version 1  |   |  Version 1  |
|   Header    |   |   Header    |
+-------------+   +-------------+
|  Version 1  |   |  Version 1  |
|  Data Block |   |  Data Block |
+-------------+   +-------------+
                  |  Version 2+ |
                  |   Header    |
                  +-------------+
                  |  Version 2+ |
                  |  Data Block |
                  +-------------+
                  |   Footer    |
                  +-------------+
]]></artwork>
      </figure>

      <section anchor='header' title='TZif Header'>

        <t>A TZif header is structured as follows
        (the lengths of multi-octet fields are shown in parentheses):</t>

        <figure title='TZif Header'>
          <artwork type='inline' align='center'><![CDATA[
+---------------+---+
|  magic    (4) |ver|
+---------------+---+---------------------------------------+
|           [unused - reserved for future use] (15)         |
+---------------+---------------+---------------+-----------+
|  isutcnt  (4) |  isstdcnt (4) |  leapcnt  (4) |
+---------------+---------------+---------------+
|  timecnt  (4) |  typecnt  (4) |  charcnt  (4) |
+---------------+---------------+---------------+
]]></artwork>
        </figure>

        <t>The fields of the header are defined as follows:</t>
        <t>
	  <list style='hanging'>
	    <t hangText="magic:">
	      The four-octet <xref target="RFC0020">ASCII</xref>
              sequence "TZif" (0x54 0x5A 0x69 0x66)
              which identifies the file as utilizing the Time Zone
              Information Format.
	    </t>
	    <t hangText="ver(sion):">
	      An octet identifying the version of the
              file's format.  The value MUST be one of the following:

	      <list style='hanging'>
	        <t hangText='NUL (0x00)'>
		  Version 1 - The file contains only the version 1
                  header and data block.
	          Version 1 files MUST NOT contain a version 2+ header,
                  data block, or footer.
	        </t>
	        <t hangText="'2' (0x32)">
		  Version 2 - The file MUST contain the version 1
	          header and data block, a version 2+ header and data
                  block, and a footer.
                  The TZ string in the
		  <xref target='footer'>footer</xref>, if
                  nonempty, MUST strictly adhere to the
		  requirements for the TZ environment variable
                  as defined in
                  <eref
                      target="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03">
                  Section 8.3 of the "Base Definitions" Volume</eref> of 
	          <xref target="POSIX"/>,
		  and MUST encode the POSIX portable character set as
		  ASCII.
	        </t>
	        <t hangText="'3' (0x33)">
		  Version 3 - The file MUST contain the version 1
	          header and data block, a version 2+ header and data
                  block, and a footer.
                  The TZ string in the
		  <xref target='footer'>footer</xref>, if
		  nonempty, MUST conform to POSIX requirements
		  with ASCII encoding,
		  except that it MAY use the TZ string extensions
                  <xref target='tzstrext'>described below</xref>.
	        </t>
	      </list>
	    </t>
	    <t hangText="isutcnt:">
              A four-octet unsigned integer specifying the number of
              UT/local indicators contained in the data block -
              MUST either be zero or equal to 'typecnt'.
	    </t>
	    <t hangText="isstdcnt:">
              A four-octet unsigned integer specifying the number of
              standard/wall indicators contained in the data block -
              MUST either be zero or equal to 'typecnt'.
	    </t>
	    <t hangText="leapcnt:">
              A four-octet unsigned integer specifying the number of
              leap second records contained in the data block.
	    </t>
	    <t hangText="timecnt:">
              A four-octet unsigned integer specifying the number of
              transition times contained in the data block.
	    </t>
	    <t hangText="typecnt:">
              A four-octet unsigned integer specifying the number of
              local time type records contained in the data block -
              MUST NOT be zero.
	      (Although local time type records convey no useful
	      information in files that have nonempty TZ strings but
	      no transitions, at least one such record is nevertheless
	      required because many TZif readers reject files that
	      have zero time types.)
	    </t>
	    <t hangText="charcnt:">
              A four-octet unsigned integer specifying the total number
              of octets used by the set of time zone designations
              contained in the data block - MUST NOT be zero.
              The count includes the trailing NUL (0x00) octet at the
              end of the last time zone designation.
	    </t>
	  </list>
        </t>
	
	<t>Although the version 1 and 2+ headers have the same format
	with the same magic number and version fields, their count
	fields may differ because the version 1 data can be a subset of
	the version 2+ data.</t>
      </section>  <!-- header -->

      <section anchor='data' title='TZif Data Block'>
  
        <t>A TZif data block consists of seven variable-length
        elements, each of which is a series of items.  The
        number of items in each series is determined by the
        corresponding count field in the header. The total length of
        each element is calculated by multiplying the number of items
        by the size of each item.  Therefore, implementations that
        do not wish to parse or use the version 1 data block can
        calculate its total length and skip directly to the header of
        the version 2+ data block.</t>

        <t>In the version 1 data block, time values are 32-bit
        (TIME_SIZE = 4 octets).  In the version 2+ data block, present
        only in version 2 and 3 files, time values are 64-bit
        (TIME_SIZE = 8 octets).</t>

        <t>The data block is structured as follows
        (the lengths of multi-octet fields are shown in parentheses):</t>

        <figure title='TZif Data Block'>
          <artwork type='inline' align='center'><![CDATA[
+---------------------------------------------------------+
|  transition times          (timecnt x TIME_SIZE)        |
+---------------------------------------------------------+
|  transition types          (timecnt)                    |
+---------------------------------------------------------+
|  local time type records   (typecnt x 6)                |
+---------------------------------------------------------+
|  time zone designations    (charcnt)                    |
+---------------------------------------------------------+
|  leap second records       (leapcnt x (TIME_SIZE + 4))  |
+---------------------------------------------------------+
|  standard/wall indicators  (isstdcnt)                   |
+---------------------------------------------------------+
|  UT/local indicators       (isutcnt)                    |
+---------------------------------------------------------+
]]></artwork>
        </figure>

        <t>The elements of the data block are defined as follows:</t>
        <t>
	  <list style='hanging'>
	    <t hangText="transition times:">
	      A series of four- or eight-octet UNIX leap time values sorted
              in strictly ascending order.
              Each value is used as a transition time at which the rules
              for computing local time may change.
	      The number of time values is specified by the 'timecnt'
              field in the header.
	      Each time value SHOULD be at least -2**59.
	      (-2**59 is the greatest negated power of 2 that predates
	      the Big Bang, and avoiding earlier timestamps works
	      around known TZif reader bugs relating to outlandlishly
	      negative timestamps.)
	    </t>
	    <t hangText="transition types:">
	      A series of one-octet unsigned integers specifying the
              type of local time of the corresponding transition time.
              These values serve as zero-based indices into the array
              of local time type records.
	      The number of type indices is specified by the 'timecnt'
              field in the header.
              Each type index MUST be in the range [0, 'typecnt' - 1].
	    </t>
	    <t hangText="local time type records:">
              A series of six-octet records specifying a local time
              type.
              The number of records is specified by the 'typecnt'
              field in the header.
              Each record has the following format
              (the lengths of multi-octet fields are shown in parentheses):
              <figure>
                <artwork type='inline'><![CDATA[
   +---------------+---+---+
   |  utoff (4)    |dst|idx|
   +---------------+---+---+
]]></artwork>
              </figure>

	      <list style='hanging'>
	        <t hangText="utoff:">
                  A four-octet signed integer specifying the number of
                  seconds to be added to UT in order to determine local
                  time.
		  The value MUST NOT be -2**31, and SHOULD be in
		  the range [-89999, 93599] (i.e., its value SHOULD be
                  more than -25 hours and less than 26 hours).
		  (Avoiding -2**31 allows 32-bit clients to negate
		  the value without overflow.
		  Restricting it to [-89999, 93599] allows easy support by
		  implementations that already support the
		  the POSIX-required range [-24:59:59, 25:59:59].)
                </t>
	        <t hangText="(is)dst:">
                  A one-octet value indicating whether local
                  time should be considered Daylight Saving Time (DST).
		  The value MUST be 0 or 1.
                  A value of one (1) indicates that this type time is DST.
                  A value of zero (0) indicates that this time type
                  is standard time.
                </t>
	        <t hangText="(desig)idx:">
                  A one-octet unsigned integer specifying a zero-based
                  index into the series of time zone designation octets,
                  thereby selecting a particular designation string.
                  Each index MUST be in the range [0, 'charcnt' - 1], and
		  designates the NUL-terminated string of octets
		  starting at position 'idx' in the time zone
		  designations.  (This string MAY be empty.)  A NUL
		  octet MUST exist in the time zone designations at or
		  after position 'idx'.
                </t>
              </list>
            </t>
	    <t hangText="time zone designations:">
              A series of octets constituting an array of
              NUL-terminated (0x00) time zone designation strings.
              The total number of octets is specified by the
              'charcnt' field in the header.
              Note that two designations MAY overlap if one is a
              suffix of the other.
	      The character encoding of time zone designation strings
	      is not specified; however, see <xref target='interop'/>
	      of this document.
	    </t>
	    <t hangText="leap second records:">
              A series of eight- or twelve-octet records specifying
              the corrections that need to be applied to UTC in order to
              determine TAI.
              The records are sorted by the occurrence time in
              strictly ascending order.
              The number of records is specified by the
              'leapcnt' field in the header.
              Each record has one of the following structures
              (the lengths of multi-octet fields are shown in parentheses):
	      <list style='hanging'>
		<t hangText="Version 1 Data Block:">
                  <figure>
                    <artwork type='inline'><![CDATA[
   +---------------+---------------+
   |  occur (4)    |  corr (4)     |               
   +---------------+---------------+
]]></artwork>
                  </figure>
                </t>
		<t hangText="version 2+ Data Block:">
                  <figure>
                    <artwork type='inline'><![CDATA[
   +---------------+---------------+---------------+
   |  occur (8)                    |  corr (4)     |
   +---------------+---------------+---------------+
]]></artwork>
                  </figure>
                </t>
              </list>
	      <list style='hanging'>
	        <t hangText="occur(rence):">
	          A four- or eight-octet UNIX leap time value specifying the
                  time at which a leap second correction occurs.
		  The first value, if present, MUST be nonnegative,
		  and each later value MUST be at least 2419199
		  greater than the previous value.
		  (This is 28 days' worth of seconds, minus a
		  potential negative leap second.)
                </t>
	        <t hangText="corr(ection):">
	          A four-octet signed integer specifying the value
		  of LEAPCORR on or after the occurrence.
		  The correction value in the first leap second record,
		  if present, MUST be either one (1) or minus one (-1).
                  The correction values in adjacent leap second
                  records MUST differ by exactly one (1).
		  The value of LEAPCORR is zero
		  for timestamps that occur before the occurrence time
		  in the first leap second record (or for all
		  timestamps if there are no leap second records).
                </t>
              </list>
	    </t>
	    <t hangText="standard/wall indicators:">
              A series of one-octet values indicating whether
              the transition times associated with local time types were
              specified as standard time or wall clock time.
	      Each value MUST be 0 or 1.
              A value of one (1) indicates standard time,
              and MUST be set to one (1) if the corresponding
              UT/local indicator is set to one (1).
              A value of zero (0) indicates wall time.
              The number of values is specified by the 'isstdcnt'
              field in the header.
              If 'isstdcnt' is zero (0), all transition times
              associated with local time types are assumed to be
              specified as wall time.
	    </t>
	    <t hangText="UT/local indicators:">
              A series of one-octet values indicating whether
              the transition times associated with local time types were
              specified as UT or local time.
	      Each value MUST be 0 or 1.
              A value of one (1) indicates UT,
              and the corresponding standard/wall indicator MUST also
              be set to one (1).
              A value of zero (0) indicates local time.
              The number of values is specified by the 'isutcnt'
              field in the header.
              If 'isutcnt' is zero (0), all transition times
              associated with local time types are assumed to be
              specified as local time.
	    </t>
	  </list>
        </t>

        <t>The type corresponding to a transition time specifies local
        time for timestamps starting at the given transition time and
        continuing up to, but not including, the next transition time.
        Local time for timestamps before the first transition is
        specified by the first time type (time type 0).
        Local time for timestamps on or after the last transition is
        specified by the TZ string in the
        <xref target='footer'>footer</xref> if present and nonempty,
        and is unspecified otherwise.
        If there are no transitions, local time for all timestamps is
        specified by the TZ string in the footer if present and
        nonempty, and is specified by time type 0 otherwise.
        </t>

        <t>A given pair of standard/wall and UT/local indicators is
        used to designate whether the corresponding transition time
        was specified as UT, standard time, or wall clock time.
        Note that there are only three combinations of the two
        indicators given that the standard/wall value MUST be one
        (1) if the UT/local value is one (1).
        This information can be useful if the transition times in a
        TZif file need to be transformed into transitions
        appropriate for another time zone (e.g. when calculating
        transition times for a simple POSIX TZ string such as
        "AKST9AKDT").</t>

        <t>In order to eliminate unused space in a TZif file, every
	nonzero local time type index SHOULD appear at least once in the
	transition type array.
        Likewise, every octet in the time zone designations array
        SHOULD be used by at least one time type record.</t>
      </section>  <!-- data -->

      <section anchor='footer' title='TZif Footer'>
  
        <t>The TZif footer is structured as follows
        (the lengths of multi-octet fields are shown in parentheses):</t>

        <figure title='TZif Footer'>
          <artwork type='inline' align='center'><![CDATA[
+---+--------------------+---+
| NL|  TZ string (0...)  |NL |
+---+--------------------+---+
]]></artwork>
        </figure>

        <t>The elements of the footer are defined as follows:</t>
        <t>
	  <list style='hanging'>
            <t hangText="NL:">
              An ASCII new line character (0x0A).
            </t>
            <t hangText="TZ string:">
              A rule for computing local time changes after the last
	      transition time stored in the version 2+ data block.
	      The string is either empty or uses the expanded format
	      of the "TZ" environment variable as defined in
              <eref
                  target="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03">
              Section 8.3 of the "Base Definitions" Volume</eref> of
              <xref
                  target="POSIX"/> with ASCII encoding, possibly utilizing
              <xref target='tzstrext'>extensions described below</xref>
              in version 3 files.
	      If the string is empty, the corresponding information is
	      not available.
	      If the string is nonempty and one or more transitions
	      appear in the version 2+ data, the string MUST be
	      consistent with the last version 2+ transition - i.e.,
              evaluating the TZ string at the time of the last
              transition should yield the same time type as the time
              type specified in the last transition.
	      The string MUST NOT contain NUL octets or be
	      NUL-terminated, and
              SHOULD NOT begin with the ':' (colon) character.
            </t>
	  </list>
        </t>

	<t>The TZif footer is present only in Version 2 and 3 files,
	as the obsolescent Version 1 format was designed before the
	need for a footer was apparent.</t>
	
        <section anchor='tzstrext' title='TZ String Extensions'>
	  <t>The TZ string in a Version 3 TZif file MAY use the
	  following extensions to POSIX TZ strings.
	  These extensions are described using the terminology of
          <eref
              target="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03">
            Section 8.3 of the "Base Definitions" Volume</eref> of 
	    <xref target="POSIX"/>.

          <list style='symbols'>
            <t>The hours part of the transition times may be
            signed and range from -167 through 167
            (-167 &lt;= hh &lt;= 167) instead of 
            the POSIX-required unsigned values from 0 through 24.
	    <list style='hanging'>
              <t hangText="Example: &lt;-03&gt;3&lt;-02&gt;,M3.5.0/-2,M10.5.0/-1">
                  <vspace/>
                  This represents a time zone that observes daylight
                  saving time from 22:00 on the day before March's last
                  Sunday until 23:00 on the day before October's last
                  Sunday. Standard time is 3 hours west of UT and is
                  abbreviated "-03"; daylight saving time is 2 hours
                  west of UT and is abbreviated "-02".
              </t>
            </list>

            </t>
            <t>DST is considered to be in effect all year if it
            starts January 1 at 00:00 and ends December 31 at
            24:00 plus the difference between daylight saving
            and standard time, leaving no room for standard time
            in the calendar.
	    <list style='hanging'>
              <t hangText="Example: EST5EDT,0/0,J365/25">
                  <vspace/>
                  This represents a time zone that observes daylight
                  saving time all year. It is 4 hours west of UT and
                  is abbreviated "EDT".
              </t>
            </list>
            </t>
          </list>
          </t>
        </section>  <!-- tzstrext -->

      </section>  <!-- footer -->

    </section>  <!-- format -->

    <section title='Interoperability Considerations' anchor='interop'>

      <t>The following practices help ensure interoperability of TZif
      applications.

      <list style='symbols'>
        <t>Version 1 files are considered a legacy format and
        SHOULD NOT be generated, as they do not support transition
        times after the year 2038.</t>

	<t>Implementations that only understand Version 1 MUST ignore
	any data that extends beyond the calculated end of the version
	1 data block.</t>
	
        <t>Implementations SHOULD generate a version 3 file if
        TZ string extensions are necessary to accurately
        model transition times.
        Otherwise, version 2 files SHOULD be generated.</t>

	<t>The sequence of time changes defined by the version 1
        header and data block SHOULD be a contiguous subsequence
	of the time changes defined by the version 2+ header and data
	block, and by the footer.
	This guideline helps obsolescent version 1 readers
	agree with current readers about timestamps within the
	contiguous subsequence.  It also lets writers not
	supporting obsolescent readers use a 'timecnt' of zero
	in the version 1 data block to save space.</t>

        <t>Time zone designations SHOULD consist of at least three (3)
        and no more than six (6) ASCII characters from the set of
	alphanumerics, '-', and '+'.
	This is for compatibility with POSIX requirements for
	time zone abbreviations.</t>

        <t>When reading a version 2 or 3 file, implementations
	SHOULD ignore the version 1 header and data block except for
        the purpose of skipping over them.</t>

	<t>Implementations SHOULD calculate the total lengths of the
	headers and data blocks and check that they all fit within
	the actual file size, as part of a validity check for the file.</t>
	
        <t>When a TZif file is used in a MIME message entity it SHOULD
        be indicated by one of the following media types:

        <list style='symbols'>
	  <t><xref target="tzif-leap">"application/tzif-leap"</xref>
          to indicate that leap second records are included in the
	  TZif data as necessary (none are necessary if the file is truncated
	  to a range that precedes the first leap second).</t>

          <t><xref target="tzif">"application/tzif"</xref>
          to indicate that leap second records are not included in the
          TZif data;
          'leapcnt' in the header(s) MUST be zero (0).</t>
        </list></t>

        <t>Common interoperability issues and possible workarounds
        are described in <xref target='issues'/>.</t>

      </list></t>

    </section>  <!-- interop -->

    <section anchor='tzdist'
             title='Use with the Time Zone Data Distribution Service'>
      <t>The <xref target="RFC7808">Time Zone Data Distribution
      Service (TZDIST)</xref> is a service that allows reliable,
      secure, and fast delivery of time zone data and leap second
      rules to client systems such as calendaring and scheduling
      applications or operating systems.</t>

      <t>A TZDIST service MAY supply time zone data to clients in
      the Time Zone Information Format.  Such a service MUST indicate
      that it supports this format by including the MIME media type
      <xref target="tzif">"application/tzif"</xref> in its
      "capabilities" response (see Section 5.1 of <xref
      target="RFC7808"/>).
      A TZDIST service MAY also include the MIME media type 
      <xref target="tzif-leap">"application/tzif-leap"</xref> in its
      "capabilities" response if it is able to generate TZif files
      containing leap second records.
      A TZDIST service MUST NOT advertise the "application/tzif-leap"
      MIME media type without also advertising "application/tzif".</t>

      <t>TZDIST clients MUST use the HTTP
      <xref target="RFC7231">"Accept"</xref> header field to indicate
      their preference to receive data in the "application/tzif"
      and/or "application/tzif-leap" formats.</t>

      <section title='Truncating TZif Files' anchor='truncation'>
        <t>As described in Section 3.9 of <xref target="RFC7808"/>,
        a TZDIST service MAY truncate time zone transition data.
        A truncated TZif file is valid from its first and up to, but
	not including, its last version 2+ transition time, if present.</t>

        <t>When truncating the start of a TZif file, the service MUST
	supply in the version 2+ data a first transition time that is
        the start point of the truncation range.
        As with untruncated TZif files, time type 0 indicates local
        time immediately before the start point, and the time type of
        the first transition indicates local time thereafter.</t>

        <t>When truncating the end of a TZif file, the service MUST
	supply in the version 2+ data a last transition time that is
        the end point of the truncation range, and MUST supply an
        empty TZ string.
        As with untruncated TZif files with empty TZ strings, a
        truncated TZif file does not indicate local time after the
        last transition.</t>

        <t>All represented information that falls inside the
        truncation range MUST be the same as that represented by a
        corresponding untruncated TZif file.</t>

        <t>TZDIST clients SHOULD NOT use a truncated TZif file (as
        described above) to interpret timestamps outside the
        truncation time range.</t>

      </section> <!-- truncation -->

      <section title='Example TZDIST Request for TZif Data'>
        <t>In this example, the client checks the server for the
          available formats and then requests that the time zone with a
          specific time zone identifier be returned in Time Zone
          Information Format.
        </t>
        <figure>
          <preamble>Note that this example presumes that the time zone
          context path has been discovered
          (see  <xref target='RFC7808' /> Section 4.2.1) to be "/tzdist".
          </preamble>
          <artwork type='inline'><![CDATA[
>> Request <<

GET /tzdist/capabilities HTTP/1.1
Host: tz.example.com

>> Response <<

HTTP/1.1 200 OK
Date: Fri, 01 Jun 2018 14:52:23 GMT
Content-Type: application/json; charset="utf-8"
Content-Length: xxxx

{
  "version": 1,

  "info": {
    "primary-source": "IANA:2018e",
    "formats": [
      "text/calendar",
      "application/tzif",
      "application/tzif-leap"
    ],
...
  },    
...
}


>> Request <<

GET /tzdist/zones/America%2FNew_York HTTP/1.1
Host: tz.example.com
Accept: application/tzif

>> Response <<

HTTP/1.1 200 OK
Date: Fri, 01 Jun 2018 14:52:24 GMT
Content-Type: application/tzif
Content-Length: xxxx
ETag: "123456789-000-111"

TZif2...[binary data without leap second records]...
EST5EDT,M3.2.0,M11.1.0
]]></artwork>
        </figure>
      </section>
    </section> <!-- TZDIST -->

    <section title='Security Considerations' anchor='security'>
      <t>The Time Zone Information Format contains no executable
      code and the format does not define any extensible
      areas that could be used to store such code.</t>

      <t>TZif contains counted arrays of data elements.
      All counts should be checked when processing TZif objects to
      guard against references past the end of the object.</t>

      <t>TZif provides no confidentiality or integrity protection.
      Time zone information is normally public and does not call
      for confidentiality protection.  Since time zone
      information is used in many critical applications,
      integrity protection may be required, and must be provided
      externally.</t>
<!--
      <t>As discussed in Section 8 of <xref target='RFC7808'/>,
      accurate time zone data is critical to determine correct time.
      As such, TZif data transmitted over a public communications
      channel SHOULD be protected with an integrity layer such as
      those provided by <xref target='RFC4301'>IPsec</xref>,
      <xref target='RFC8446'>TLS</xref>,
      or <xref target='RFC5751'>S/MIME</xref>.</t>

      <t>When TZif is used as a data format within the Time Zone
      Distribution Service (TSDIST), the Security Considerations in
      Section 8 of <xref target='RFC7808'/> apply.</t>
-->
    </section>

    <section title='Privacy Considerations' anchor='privacy'>
      <t>The Time Zone Information Format contains publicly available
      data and the format does not define any extensible areas that
      could be used to store private data.</t>

      <t>As discussed in Section 9 of <xref target='RFC7808'/>,
      transmission of time zone data over an insecure communications
      channel could leak the past, current, or future location of a
      device or user.
      As such, TZif data transmitted over a public communications
      channel MUST be protected with a confidentiality layer such as
      that provided by <xref target='RFC8446'>Transport Layer Security
      (TLS)</xref>.</t>
    </section>

    <section title='IANA Considerations' anchor='iana'>
      <t>This document defines two <xref target='RFC6838'>MIME</xref>
      media types for the exchange of data utilizing the Time Zone
      Information Format.</t>

      <section title='application/tzif' anchor='tzif'>
      <t>
	<list style='hanging'>
          <t hangText="Type name:">application</t>
          <t hangText="Subtype name:">tzif</t>
          <t hangText="Required parameters:">none</t>
          <t hangText="Optional parameters:">none</t>
          <t hangText="Encoding considerations:">binary</t>
          <t hangText="Security considerations:">
            See <xref target='security'/> of this document.
          </t>
          <t hangText="Interoperability considerations:">
            See <xref target='interop'/> of this document.
          </t>
          <t hangText="Published specification:">
            This specification.
          </t>
          <t hangText="Applications that use this media type:">
            This media type is designed for widespread use by
            applications that need to use or exchange time zone
            information, such as the
            <eref
		target='http://man7.org/linux/man-pages/man8/zic.8.html'>
              Time Zone Information Compiler (zic)
            </eref>
            and the
            <eref target='https://www.gnu.org/software/libc/'>
              GNU C Library</eref>.
            The <xref target='RFC7808'>Time Zone Distribution
            Service</xref> can directly use this media type.
          </t>
          <t hangText="Fragment identifier considerations:">N/A</t>
          <t hangText="Additional information:">
	    <list style='hanging'>
              <t hangText="Magic number(s):">
              The first 4 octets are 0x54, 0x5A, 0x69, 0x66</t>
              <t hangText="File extensions(s):">N/A</t>
              <t hangText="Macintosh file type code(s):">N/A</t>
            </list>
          </t>
          <t hangText="Person &amp; email address to contact for further
                       information:">
            Time Zone Database mailing list &lt;tz@iana.org&gt;
          </t>
          <t hangText="Intended usage:">COMMON</t>
          <t hangText="Restrictions on usage:">N/A</t>
          <t hangText="Author:">
            See the "Author's Address" section of this document.
          </t>
          <t hangText="Change controller:">IETF</t>
        </list>
      </t>
      </section>

      <section title='application/tzif-leap' anchor='tzif-leap'>
      <t>
	<list style='hanging'>
          <t hangText="Type name:">application</t>
          <t hangText="Subtype name:">tzif-leap</t>
          <t hangText="Required parameters:">none</t>
          <t hangText="Optional parameters:">none</t>
          <t hangText="Encoding considerations:">binary</t>
          <t hangText="Security considerations:">
            See <xref target='security'/> of this document.
          </t>
          <t hangText="Interoperability considerations:">
            See <xref target='interop'/> of this document.
          </t>
          <t hangText="Published specification:">
            This specification.
          </t>
          <t hangText="Applications that use this media type:">
            This media type is designed for widespread use by
            applications that need to use or exchange time zone
            information, such as the
            <eref
		target='http://man7.org/linux/man-pages/man8/zic.8.html'>
              Time Zone Information Compiler (zic)
            </eref>
            and the
            <eref target='https://www.gnu.org/software/libc/'>
              GNU C Library</eref>.
            The <xref target='RFC7808'>Time Zone Distribution
            Service</xref> can directly use this media type.
          </t>
          <t hangText="Fragment identifier considerations:">N/A</t>
          <t hangText="Additional information:">
	    <list style='hanging'>
              <t hangText="Magic number(s):">
              The first 4 octets are 0x54, 0x5A, 0x69, 0x66</t>
              <t hangText="File extensions(s):">N/A</t>
              <t hangText="Macintosh file type code(s):">N/A</t>
            </list>
          </t>
          <t hangText="Person &amp; email address to contact for further
                       information:">
            Time Zone Database mailing list &lt;tz@iana.org&gt;
          </t>
          <t hangText="Intended usage:">COMMON</t>
          <t hangText="Restrictions on usage:">N/A</t>
          <t hangText="Author:">
            See the "Author's Address" section of this document.
          </t>
          <t hangText="Change controller:">IETF</t>
        </list>
      </t>
      </section>

    </section> <!-- IANA -->

    <section title='Acknowledgments'>
      <t>The authors would like to thank the following individuals for
      contributing their ideas and support for writing this
      specification: Michael Douglass, Ned Freed, Guy Harris,
      Eliot Lear, and Alexey Melnikov.</t> 
    </section>

  </middle>

  <back>
    <references title='Normative References'>
      &rfc0020;
      &rfc2119;
      &rfc6838;
      &rfc7231;
      &rfc7808;
      &rfc8174;

      <reference anchor='POSIX'
	         target="http://pubs.opengroup.org/onlinepubs/9699919799/">
        <front>
          <title>Standard for Information Technology--Portable Operating
          System Interface (POSIX(R)) Base Specifications, Issue 7</title>
          <author>
            <organization>IEEE</organization>
          </author>
          <date day="31" month="January" year="2018"/>          
        </front>
        <seriesInfo name="IEEE" value="1003.1-2017"/>
        <seriesInfo name="DOI" value="10.1109/IEEESTD.2018.8277153"/>
        <annotation>
	  This standard is also <eref
	  target="https://ieeexplore.ieee.org/servlet/opac?punumber=8277151"/>
	  published by ieeexplore.ieee.org.
	</annotation>
      </reference>
    </references>

    <references title='Informative References'>
      &rfc5545;
      &rfc6557;
      &rfc8446;

      <reference anchor='tz-link'
                 target="https://www.iana.org/time-zones/repository/tz-link.html">
        <front>
          <title>
            Sources for Time Zone and Daylight Saving Time Data
          </title>
          <author initials="P." surname="Eggert"
                  fullname="Paul Eggert"/>
          <author initials="A.D." surname="Olson"
                  fullname="Arthur David Olson"/>
          <date year='2018'/>
        </front>
      </reference>
    </references>

    <section title='Common Interoperability Issues' anchor='issues'>
	
      <t>This section documents common problems in implementing this
      specification.
      Most of these are problems in generating TZif files for use by
      readers conforming to
      <eref target='https://github.com/eggert/tz/commits/master/tzfile.5'>
	predecessors of this specification</eref>.
      The goals of this section are:

      <list style='numbers'>
        <t>to help TZif writers output files that avoid common
        pitfalls in older or buggy TZif readers,</t>

        <t>to help TZif readers avoid common pitfalls when reading
        files generated by future TZif writers, and</t>

        <t>to help any future specification authors see what sort of
        problems arise when the TZif format is changed.</t>
      </list></t>
	
      <t>When new versions of the TZif format have been defined, a
      design goal has been that a reader can successfully use a TZif
      file even if the file is of a later TZif version than what the
      reader was designed for.
      When complete compatibility was not achieved, an attempt was
      made to limit glitches to rarely-used timestamps, and to allow
      simple partial workarounds in writers designed to generate
      new-version data useful even for older-version readers.
      This section attempts to document these compatibility issues and
      workarounds, as well as to document other common bugs in
      readers.</t>	

      <t>Interoperability problems with TZif include the following:

      <list style='symbols'>
	<t>Some readers examine only version 1 data.
	As a partial workaround, a writer can output as much version 1
        data as possible.
	However, a reader should ignore version 1 data, and should use
	version 2+ data even if the reader's native timestamps have only
        32 bits.</t>
	
	<t>Some readers designed for version 2 might mishandle
        timestamps after a version 3 file's last transition, because
        they cannot parse extensions to POSIX in the TZ-like string.
	As a partial workaround, a writer can output more transitions
        than necessary, so that only far-future timestamps are
        mishandled by version 2 readers.</t>
	
	<t>Some readers designed for version 2 do not support
        permanent daylight saving time, e.g., a TZ string
        "EST5EDT,0/0,J365/25" denoting permanent Eastern Daylight Time
        (-04).
	As a partial workaround, a writer can substitute standard time
        for the next time zone east, e.g., "AST4" for permanent
        Atlantic Standard Time (-04).</t>
	
	<t>Some readers ignore the footer, and instead predict future
        timestamps from the time type of the last transition.
	As a partial workaround, a writer can output more transitions
        than necessary.</t>
	
	<t>Some readers do not use time type 0 for timestamps before
        the first transition, in that they infer a time type using a
        heuristic that does not always select time type 0.
	As a partial workaround, a writer can output a dummy (no-op)
	first transition at an early time.</t>
	
	<t>Some readers mishandle timestamps before the first
        transition that has a timestamp not less than -2**31.
	Readers that support only 32-bit timestamps are likely to be
        more prone to this problem, for example, when they process
        64-bit transitions only some of which are representable in 32
        bits.
	As a partial workaround, a writer can output a dummy
        transition at timestamp -2**31.</t>
	
	<t>Some readers mishandle a transition if its timestamp has
        the minimum possible signed 64-bit value.
	Timestamps less than -2**59 are not recommended.</t>
	
	<t>Some readers mishandle POSIX-style TZ strings that
	contain '&lt;' or '&gt;'.
	As a partial workaround, a writer can avoid using '&lt;' or '&gt;'
	for time zone abbreviations containing only alphabetic
        characters.</t>
	
	<t>Many readers mishandle time zone abbreviations that contain
        non-ASCII characters.
	These characters are not recommended.</t>
	
	<t>Some readers may mishandle time zone abbreviations that
        contain fewer than 3 or more than 6 characters, or that
        contain ASCII characters other than alphanumerics, '-', and
        '+'.
	These abbreviations are not recommended.</t>
	
	<t>Some readers mishandle TZif files that specify
        daylight-saving time UT offsets that are less than the UT
        offsets for the corresponding standard time.
        These readers do not support locations like Ireland, which
        uses the equivalent of the POSIX TZ string
        "IST-1GMT0,M10.5.0,M3.5.0/1", observing standard time
        (IST, +01) in summer and daylight saving time (GMT, +00) in
        winter.
	As a partial workaround, a writer can output data for the
        equivalent of the POSIX TZ string "GMT0IST,M3.5.0/1,M10.5.0",
	thus swapping standard and daylight saving time.
	Although this workaround misidentifies which part of the year
        uses daylight saving time, it records UT offsets and time zone
        abbreviations correctly.</t>
      </list></t>
	
      <t>Some interoperability problems are reader bugs that
      are listed here mostly as warnings to developers of readers.

      <list style='symbols'>
        <t>Some readers do not support negative timestamps.
        Developers of distributed applications should keep this
        in mind if they need to deal with pre-1970 data.</t>
	
        <t>Some readers mishandle timestamps before the first
        transition that has a nonnegative timestamp.
        Readers that do not support negative timestamps are likely to
        be more prone to this problem.</t>
	
        <t>Some readers mishandle time zone abbreviations like "-08"
        that contain '+', '-', or digits.</t>
	
        <t>Some readers mishandle UT offsets that are out of the
        traditional range of -12 through +12 hours, and so do not
        support locations like Kiritimati that are outside this
        range.</t>
	
        <t>Some readers mishandle UT offsets in the range [-3599, -1]
        seconds from UT, because they integer-divide the offset by
        3600 to get 0 and then display the hour part as "+00".</t>
	
        <t>Some readers mishandle UT offsets that are not a multiple
        of one hour, or of 15 minutes, or of 1 minute.</t>
      </list></t>
    </section>  <!-- issues -->

    <section title='Example TZif Files' anchor='examples'>
      <t>The following sections contain annotated hexadecimal dumps of
      example TZif files.</t>

      <t>Note that these examples should only be considered informative.
      Although the example data entries are current as of the
      publication date of this document, the data will likely change
      in the future as leap seconds are added and changes are made to
      civil time.</t>

      <section title='Version 1 File Representing UTC (with Leap Seconds)'>

        <texttable>
          <ttcol>File Offset</ttcol> <ttcol>Data Octets (hexadecimal)</ttcol>
          <ttcol>Record Name / Field Name</ttcol> <ttcol>Field Value</ttcol>
          <c>000</c> <c>54 5a 69 66</c> <c>magic</c> <c>"TZif"</c>
          <c>004</c> <c>00</c> <c>version</c> <c>0 (1)</c>
          <c>005</c> <c>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</c> <c/> <c/>
          <c>020</c> <c>00 00 00 01</c> <c>isutccnt</c> <c>1</c>
          <c>024</c> <c>00 00 00 01</c> <c>isstdcnt</c> <c>1</c>
          <c>028</c> <c>00 00 00 1b</c> <c>isleapcnt</c> <c>27</c>
          <c>032</c> <c>00 00 00 00</c> <c>timecnt</c> <c>0</c>
          <c>036</c> <c>00 00 00 01</c> <c>typecnt</c> <c>1</c>
          <c>040</c> <c>00 00 00 04</c> <c>charcnt</c> <c>4</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[0]</c> <c/>
          <c>044</c> <c>00 00 00 00</c> <c>utcoff</c> <c>00:00</c>
          <c>048</c> <c>00</c> <c>isdst</c> <c>0 (no)</c>
          <c>049</c> <c>00</c> <c>desigidx</c> <c>0</c>
          <c/> <c/> <c/> <c/>

          <c>050</c> <c>55 54 43 00</c> <c>designations[0]</c> <c>"UTC"</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[0]</c> <c/>
          <c>054</c> <c>04 b2 58 00</c> <c>occurrence</c>
          <c>78796800 (1972-06-30T23:59:60Z)</c>
          <c>058</c> <c>00 00 00 01</c> <c>correction</c> <c>1</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[1]</c> <c/>
          <c>062</c> <c>05 a4 ec 01</c> <c>occurrence</c>
          <c>94694401 (1972-12-31T23:59:60Z)</c>
          <c>066</c> <c>00 00 00 02</c> <c>correction</c> <c>2</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[2]</c> <c/>
          <c>070</c> <c>07 86 1f 82</c> <c>occurrence</c>
          <c>126230402 (1973-12-31T23:59:60Z)</c>
          <c>074</c> <c>00 00 00 03</c> <c>correction</c> <c>3</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[3]</c> <c/>
          <c>078</c> <c>09 67 53 03</c> <c>occurrence</c>
          <c>157766403 (1974-12-31T23:59:60Z)</c>
          <c>082</c> <c>00 00 00 04</c> <c>correction</c> <c>4</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[4]</c> <c/>
          <c>086</c> <c>0b 48 86 84</c> <c>occurrence</c>
          <c>189302404 (1975-12-31T23:59:60Z)</c>
          <c>090</c> <c>00 00 00 05</c> <c>correction</c> <c>5</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[5]</c> <c/>
          <c>094</c> <c>0d 2b 0b 85</c> <c>occurrence</c>
          <c>220924805 (1976-12-31T23:59:60Z)</c>
          <c>098</c> <c>00 00 00 06</c> <c>correction</c> <c>6</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[6]</c> <c/>
          <c>102</c> <c>0f 0c 3f 06</c> <c>occurrence</c>
          <c>252460806 (1977-12-31T23:59:60Z)</c>
          <c>106</c> <c>00 00 00 07</c> <c>correction</c> <c>7</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[7]</c> <c/>
          <c>110</c> <c>10 ed 72 87</c> <c>occurrence</c>
          <c>283996807 (1978-12-31T23:59:60Z)</c>
          <c>114</c> <c>00 00 00 08</c> <c>correction</c> <c>8</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[8]</c> <c/>
          <c>118</c> <c>12 ce a6 08</c> <c>occurrence</c>
          <c>315532808 (1979-12-31T23:59:60Z)</c>
          <c>122</c> <c>00 00 00 09</c> <c>correction</c> <c>9</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[9]</c> <c/>
          <c>126</c> <c>15 9f ca 89</c> <c>occurrence</c>
          <c>362793609 (1981-06-30T23:59:60Z)</c>
          <c>130</c> <c>00 00 00 0a</c> <c>correction</c> <c>10</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[10]</c> <c/>
          <c>134</c> <c>17 80 fe 0a</c> <c>occurrence</c>
          <c>394329610 (1982-06-30T23:59:60Z)</c>
          <c>138</c> <c>00 00 00 0b</c> <c>correction</c> <c>11</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[11]</c> <c/>
          <c>142</c> <c>19 62 31 8b</c> <c>occurrence</c>
          <c>425865611 (1983-06-30T23:59:60Z)</c>
          <c>146</c> <c>00 00 00 0c</c> <c>correction</c> <c>12</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[12]</c> <c/>
          <c>150</c> <c>1d 25 ea 0c</c> <c>occurrence</c>
          <c>489024012 (1985-06-30T23:59:60Z)</c>
          <c>154</c> <c>00 00 00 0d</c> <c>correction</c> <c>13</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[13]</c> <c/>
          <c>158</c> <c>21 da e5 0d</c> <c>occurrence</c>
          <c>567993613 (1987-12-31T23:59:60Z)</c>
          <c>162</c> <c>00 00 00 0e</c> <c>correction</c> <c>14</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[14]</c> <c/>
          <c>166</c> <c>25 9e 9d 8e</c> <c>occurrence</c>
          <c>631152014 (1989-12-31T23:59:60Z)</c>
          <c>170</c> <c>00 00 00 0f</c> <c>correction</c> <c>15</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[15]</c> <c/>
          <c>174</c> <c>27 7f d1 0f</c> <c>occurrence</c>
          <c>662688015 (1990-12-31T23:59:60Z)</c>
          <c>178</c> <c>00 00 00 10</c> <c>correction</c> <c>16</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[16]</c> <c/>
          <c>182</c> <c>2a 50 f5 90</c> <c>occurrence</c>
          <c>709948816 (1992-06-30T23:59:60Z)</c>
          <c>186</c> <c>00 00 00 11</c> <c>correction</c> <c>17</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[17]</c> <c/>
          <c>190</c> <c>2c 32 29 11</c> <c>occurrence</c>
          <c>741484817 (1993-06-30T23:59:60Z)</c>
          <c>194</c> <c>00 00 00 12</c> <c>correction</c> <c>18</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[18]</c> <c/>
          <c>198</c> <c>2e 13 5c 92</c> <c>occurrence</c>
          <c>773020818 (1994-06-30T23:59:60Z)</c>
          <c>202</c> <c>00 00 00 13</c> <c>correction</c> <c>19</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[19]</c> <c/>
          <c>206</c> <c>30 e7 24 13</c> <c>occurrence</c>
          <c>820454419 (1995-12-31T23:59:60Z)</c>
          <c>210</c> <c>00 00 00 14</c> <c>correction</c> <c>20</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[20]</c> <c/>
          <c>214</c> <c>33 b8 48 94</c> <c>occurrence</c>
          <c>867715220 (1997-06-30T23:59:60Z)</c>
          <c>218</c> <c>00 00 00 15</c> <c>correction</c> <c>21</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[21]</c> <c/>
          <c>222</c> <c>36 8c 10 15</c> <c>occurrence</c>
          <c>915148821 (1998-12-31T23:59:60Z)</c>
          <c>226</c> <c>00 00 00 16</c> <c>correction</c> <c>22</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[22]</c> <c/>
          <c>230</c> <c>43 b7 1b 96</c> <c>occurrence</c>
          <c>1136073622 (2005-12-31T23:59:60Z)</c>
          <c>234</c> <c>00 00 00 17</c> <c>correction</c> <c>23</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[23]</c> <c/>
          <c>238</c> <c>49 5c 07 97</c> <c>occurrence</c>
          <c>1230768023 (2008-12-31T23:59:60Z)</c>
          <c>242</c> <c>00 00 00 18</c> <c>correction</c> <c>24</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[24]</c> <c/>
          <c>246</c> <c>4f ef 93 18</c> <c>occurrence</c>
          <c>1341100824 (2012-06-30T23:59:60Z)</c>
          <c>250</c> <c>00 00 00 19</c> <c>correction</c> <c>25</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[25]</c> <c/>
          <c>254</c> <c>55 93 2d 99</c> <c>occurrence</c>
          <c>1435708825 (2015-06-30T23:59:60Z)</c>
          <c>258</c> <c>00 00 00 1a</c> <c>correction</c> <c>26</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>leapsecond[26]</c> <c/>
          <c>262</c> <c>58 68 46 9a</c> <c>occurrence</c>
          <c>1483228826 (2016-12-31T23:59:60Z)</c>
          <c>266</c> <c>00 00 00 1b</c> <c>correction</c> <c>27</c>
          <c/> <c/> <c/> <c/>

          <c>270</c> <c>00</c> <c>UT/local[0]</c> <c>0 (local)</c>
          <c/> <c/> <c/> <c/>

          <c>271</c> <c>00</c> <c>standard/wall[0]</c> <c>0 (wall)</c>
        </texttable>

        <t>To determine TAI corresponding
        to 2000-01-01T00:00:00Z (UNIX time = 946684800), the following
        procedure would be followed:

        <list style='numbers'>
          <t>Find the the latest leap second occurrence  prior to the
          time of interest (leapsecond[21]) and note the correction
          value (LEAPCORR = 22).</t>
          <t>Add LEAPCORR + 10 to the time of interest to
          yield TAI of 2000-01-01T00:00:32.</t>
        </list></t>
      </section>

      <section title='Version 2 File Representing Pacific/Honolulu'>
        <texttable>
          <ttcol>File Offset</ttcol> <ttcol>Hexadecimal Octets</ttcol>
          <ttcol>Record Name / Field Name</ttcol> <ttcol>Field Value</ttcol>
          <c>000</c> <c>54 5a 69 66</c> <c>magic</c> <c>"TZif"</c>
          <c>004</c> <c>32</c> <c>version</c> <c>'2' (2)</c>
          <c>005</c> <c>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</c> <c/> <c/>
          <c>020</c> <c>00 00 00 06</c> <c>isutccnt</c> <c>6</c>
          <c>024</c> <c>00 00 00 06</c> <c>isstdcnt</c> <c>6</c>
          <c>028</c> <c>00 00 00 00</c> <c>isleapcnt</c> <c>0</c>
          <c>032</c> <c>00 00 00 07</c> <c>timecnt</c> <c>7</c>
          <c>036</c> <c>00 00 00 06</c> <c>typecnt</c> <c>6</c>
          <c>040</c> <c>00 00 00 14</c> <c>charcnt</c> <c>20</c>
          <c/> <c/> <c/> <c/>

          <c>044</c> <c>80 00 00 00</c> <c>trans time[0]</c>
          <c>-2147483648 (1901-12-13T20:45:52Z)</c>

          <c>048</c> <c>bb 05 43 48</c> <c>trans time[1]</c>
          <c>-1157283000 (1933-04-30T12:30:00Z)</c>

          <c>052</c> <c>bb 21 71 58</c> <c>trans time[2]</c>
          <c>-1155436200 (1933-05-21T21:30:00Z)</c>

          <c>056</c> <c>cb 89 3d c8</c> <c>trans time[3]</c>
          <c>-880198200 (1942-02-09T12:30:00Z)</c>

          <c>060</c> <c>d2 23 f4 70</c> <c>trans time[4]</c>
          <c>-769395600 (1945-08-14T23:00:00Z)</c>

          <c>064</c> <c>d2 61 49 38</c> <c>trans time[5]</c>
          <c>-765376200 (1945-09-30T11:30:00Z)</c>

          <c>068</c> <c>d5 8d 73 48</c> <c>trans time[6]</c>
          <c>-712150200 (1947-06-08T12:30:00Z)</c>
          <c/> <c/> <c/> <c/>

          <c>072</c> <c>01</c> <c>trans type[0]</c> <c>1</c>
          <c>073</c> <c>02</c> <c>trans type[1]</c> <c>2</c>
          <c>074</c> <c>01</c> <c>trans type[2]</c> <c>1</c>
          <c>075</c> <c>03</c> <c>trans type[3]</c> <c>3</c>
          <c>076</c> <c>04</c> <c>trans type[4]</c> <c>4</c>
          <c>077</c> <c>01</c> <c>trans type[5]</c> <c>1</c>
          <c>078</c> <c>05</c> <c>trans type[6]</c> <c>5</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[0]</c> <c/>
          <c>079</c> <c>ff ff 6c 02</c> <c>utcoff</c> <c>-37886 (-10:21:26)</c>
          <c>083</c> <c>00</c> <c>isdst</c> <c>0 (no)</c>
          <c>084</c> <c>00</c> <c>desigidx</c> <c>0</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[1]</c> <c/>
          <c>085</c> <c>ff ff 6c 58</c> <c>utcoff</c> <c>-37800 (-10:30)</c>
          <c>089</c> <c>00</c> <c>isdst</c> <c>0 (no)</c>
          <c>090</c> <c>04</c> <c>desigidx</c> <c>4</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[2]</c> <c/>
          <c>091</c> <c>ff ff 7a 68</c> <c>utcoff</c> <c>-34200 (-09:30)</c>
          <c>095</c> <c>01</c> <c>isdst</c> <c>1 (yes)</c>
          <c>096</c> <c>08</c> <c>desigidx</c> <c>8</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[3]</c> <c/>
          <c>097</c> <c>ff ff 7a 68</c> <c>utcoff</c> <c>-34200 (-09:30)</c>
          <c>101</c> <c>01</c> <c>isdst</c> <c>1 (yes)</c>
          <c>102</c> <c>0c</c> <c>desigidx</c> <c>12</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[4]</c> <c/>
          <c>103</c> <c>ff ff 7a 68</c> <c>utcoff</c> <c>-34200 (-09:30)</c>
          <c>107</c> <c>01</c> <c>isdst</c> <c>1 (yes)</c>
          <c>108</c> <c>10</c> <c>desigidx</c> <c>16</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[5]</c> <c/>
          <c>109</c> <c>ff ff 73 60</c> <c>utcoff</c> <c>-36000 (-10:00)</c>
          <c>113</c> <c>00</c> <c>isdst</c> <c>0 (no)</c>
          <c>114</c> <c>04</c> <c>desigidx</c> <c>4</c>
          <c/> <c/> <c/> <c/>

          <c>115</c> <c>4c 4d 54 00</c> <c>designations[0]</c> <c>"LMT"</c>
          <c>119</c> <c>48 53 54 00</c> <c>designations[4]</c> <c>"HST"</c>
          <c>123</c> <c>48 44 54 00</c> <c>designations[8]</c> <c>"HDT"</c>
          <c>127</c> <c>48 57 54 00</c> <c>designations[12]</c> <c>"HWT"</c>
          <c>131</c> <c>48 50 54 00</c> <c>designations[16]</c> <c>"HPT"</c>
          <c/> <c/> <c/> <c/>

          <c>135</c> <c>00</c> <c>UT/local[0]</c> <c>1 (UT)</c>
          <c>136</c> <c>00</c> <c>UT/local[1]</c> <c>0 (local)</c>
          <c>137</c> <c>00</c> <c>UT/local[2]</c> <c>0 (local)</c>
          <c>138</c> <c>00</c> <c>UT/local[3]</c> <c>0 (local)</c>
          <c>139</c> <c>01</c> <c>UT/local[4]</c> <c>1 (UT)</c>
          <c>140</c> <c>00</c> <c>UT/local[5]</c> <c>0 (local)</c>
          <c/> <c/> <c/> <c/>

          <c>141</c> <c>00</c> <c>standard/wall[0]</c> <c>1 (standard)</c>
          <c>142</c> <c>00</c> <c>standard/wall[1]</c> <c>0 (wall)</c>
          <c>143</c> <c>00</c> <c>standard/wall[2]</c> <c>0 (wall)</c>
          <c>144</c> <c>00</c> <c>standard/wall[3]</c> <c>0 (wall)</c>
          <c>145</c> <c>01</c> <c>standard/wall[4]</c> <c>1 (standard)</c>
          <c>146</c> <c>00</c> <c>standard/wall[5]</c> <c>0 (wall)</c>
          <c/> <c/> <c/> <c/>

          <c>147</c> <c>54 5a 69 66</c> <c>magic</c> <c>"TZif"</c>
          <c>151</c> <c>32</c> <c>version</c> <c>'2' (2)</c>
          <c>152</c> <c>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</c> <c/> <c/>
          <c>167</c> <c>00 00 00 06</c> <c>isutccnt</c> <c>6</c>
          <c>171</c> <c>00 00 00 06</c> <c>isstdcnt</c> <c>6</c>
          <c>175</c> <c>00 00 00 00</c> <c>isleapcnt</c> <c>0</c>
          <c>179</c> <c>00 00 00 07</c> <c>timecnt</c> <c>7</c>
          <c>183</c> <c>00 00 00 06</c> <c>typecnt</c> <c>6</c>
          <c>187</c> <c>00 00 00 14</c> <c>charcnt</c> <c>20</c>
          <c/> <c/> <c/> <c/>

          <c>191</c> <c>ff ff ff ff 74 e0 70 be</c> <c>trans time[0]</c>
          <c>-2334101314 (1896-01-13T22:31:26Z)</c>

          <c>199</c> <c>ff ff ff ff bb 05 43 48</c> <c>trans time[1]</c>
          <c>-1157283000 (1933-04-30T12:30:00Z)</c>

          <c>207</c> <c>ff ff ff ff bb 21 71 58</c> <c>trans time[2]</c>
          <c>-1155436200 (1933-05-21T21:30:00Z)</c>

          <c>215</c> <c>ff ff ff ff cb 89 3d c8</c> <c>trans time[3]</c>
          <c>-880198200 (1942-02-09T12:30:00Z)</c>

          <c>223</c> <c>ff ff ff ff d2 23 f4 70</c> <c>trans time[4]</c>
          <c>-769395600 (1945-08-14T23:00:00Z)</c>

          <c>231</c> <c>ff ff ff ff d2 61 49 38</c> <c>trans time[5]</c>
          <c>-765376200 (1945-09-30T11:30:00Z)</c>

          <c>239</c> <c>ff ff ff ff d5 8d 73 48</c> <c>trans time[6]</c>
          <c>-712150200 (1947-06-08T12:30:00Z)</c>
          <c/> <c/> <c/> <c/>

          <c>247</c> <c>01</c> <c>trans type[0]</c> <c>1</c>
          <c>248</c> <c>02</c> <c>trans type[1]</c> <c>2</c>
          <c>249</c> <c>01</c> <c>trans type[2]</c> <c>1</c>
          <c>250</c> <c>03</c> <c>trans type[3]</c> <c>3</c>
          <c>251</c> <c>04</c> <c>trans type[4]</c> <c>4</c>
          <c>252</c> <c>01</c> <c>trans type[5]</c> <c>1</c>
          <c>253</c> <c>05</c> <c>trans type[6]</c> <c>5</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[0]</c> <c/>
          <c>254</c> <c>ff ff 6c 02</c> <c>utcoff</c> <c>-37886 (-10:21:26)</c>
          <c>258</c> <c>00</c> <c>isdst</c> <c>0 (no)</c>
          <c>259</c> <c>00</c> <c>desigidx</c> <c>0</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[1]</c> <c/>
          <c>260</c> <c>ff ff 6c 58</c> <c>utcoff</c> <c>-37800 (-10:30)</c>
          <c>264</c> <c>00</c> <c>isdst</c> <c>0 (no)</c>
          <c>265</c> <c>04</c> <c>desigidx</c> <c>4</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[2]</c> <c/>
          <c>266</c> <c>ff ff 7a 68</c> <c>utcoff</c> <c>-34200 (-09:30)</c>
          <c>270</c> <c>01</c> <c>isdst</c> <c>1 (yes)</c>
          <c>271</c> <c>08</c> <c>desigidx</c> <c>8</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[3]</c> <c/>
          <c>272</c> <c>ff ff 7a 68</c> <c>utcoff</c> <c>-34200 (-09:30)</c>
          <c>276</c> <c>01</c> <c>isdst</c> <c>1 (yes)</c>
          <c>277</c> <c>0c</c> <c>desigidx</c> <c>12</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[4]</c> <c/>
          <c>278</c> <c>ff ff 7a 68</c> <c>utcoff</c> <c>-34200 (-09:30)</c>
          <c>282</c> <c>01</c> <c>isdst</c> <c>1 (yes)</c>
          <c>283</c> <c>10</c> <c>desigidx</c> <c>16</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[5]</c> <c/>
          <c>284</c> <c>ff ff 73 60</c> <c>utcoff</c> <c>-36000 (-10:00)</c>
          <c>288</c> <c>00</c> <c>isdst</c> <c>0 (no)</c>
          <c>289</c> <c>04</c> <c>desigidx</c> <c>4</c>
          <c/> <c/> <c/> <c/>

          <c>290</c> <c>4c 4d 54 00</c> <c>designations[0]</c> <c>"LMT"</c>
          <c>294</c> <c>48 53 54 00</c> <c>designations[4]</c> <c>"HST"</c>
          <c>298</c> <c>48 44 54 00</c> <c>designations[8]</c> <c>"HDT"</c>
          <c>302</c> <c>48 57 54 00</c> <c>designations[12]</c> <c>"HWT"</c>
          <c>306</c> <c>48 50 54 00</c> <c>designations[16]</c> <c>"HPT"</c>
          <c/> <c/> <c/> <c/>

          <c>310</c> <c>00</c> <c>UT/local[0]</c> <c>0 (local)</c>
          <c>311</c> <c>00</c> <c>UT/local[1]</c> <c>0 (local)</c>
          <c>312</c> <c>00</c> <c>UT/local[2]</c> <c>0 (local)</c>
          <c>313</c> <c>00</c> <c>UT/local[3]</c> <c>0 (local)</c>
          <c>314</c> <c>01</c> <c>UT/local[4]</c> <c>1 (UT)</c>
          <c>315</c> <c>00</c> <c>UT/local[5]</c> <c>0 (local)</c>
          <c/> <c/> <c/> <c/>

          <c>316</c> <c>00</c> <c>standard/wall[0]</c> <c>0 (wall)</c>
          <c>317</c> <c>00</c> <c>standard/wall[1]</c> <c>0 (wall)</c>
          <c>318</c> <c>00</c> <c>standard/wall[2]</c> <c>0 (wall)</c>
          <c>319</c> <c>00</c> <c>standard/wall[3]</c> <c>0 (wall)</c>
          <c>320</c> <c>01</c> <c>standard/wall[4]</c> <c>1 (standard)</c>
          <c>321</c> <c>00</c> <c>standard/wall[5]</c> <c>0 (wall)</c>
          <c/> <c/> <c/> <c/>

          <c>322</c> <c>0a</c> <c>NL</c> <c>'\n'</c>
          <c>323</c> <c>48 53 54 31 30</c> <c>TZ string</c> <c>"HST10"</c>
          <c>328</c> <c>0a</c> <c>NL</c> <c>'\n'</c>
        </texttable>

        <t>To determine the local time in this time zone corresponding
        to 1933-05-04T12:00:00Z (UNIX time = -1156939200), the
        following procedure would be followed:

        <list style='numbers'>
          <t>Find the the latest time transition prior to the time of
          interest (trans time[1]).</t>
          <t>Reference the corresponding transition type (trans
          type[1]) to determine the local time type index (2).</t>
          <t>Reference the corresponding local time type
          (localtimetype[2]) to determine the offset from UTC
          (-09:30), the daylight saving indicator (1 = yes), and the
          index into the time zone designation strings (8).</t>
          <t>Lookup the corresponding time zone designation string
          (designations[8] = "HDT").</t>
          <t>Add the UTC offset to the time of interest to yield a
          local daylight saving time of 1933-05-04T02:30:00-09:30 (HDT).</t>
        </list></t>

        <t>To determine the local time in this time zone corresponding
        to 2019-01-01T00:00:00Z (UNIX time = 1546300800), the following
        procedure would be followed:

        <list style='numbers'>
          <t>Find the the latest time transition prior to the time of
          interest (there is no such transition).</t>
          <t>Lookup the TZ string in the footer ("HST10"), which
          indicates that the time zone designation is "HST" year
          round, and the offset to UTC is 10:00.</t>
          <t>Subtract the UTC offset from the time of interest to
          yield a standard local time of 2018-12-31T14:00:00-10:00 (HST).</t>
        </list></t>
      </section>

      <section title='Truncated Version 3 File Representing Asia/Jerusalem'>

        <t>The following TZif file has been truncated to start on
        2038-01-01T00:00:00Z.</t> 

        <texttable>
          <ttcol>File Offset</ttcol> <ttcol>Hexadecimal Octets</ttcol>
          <ttcol>Record Name / Field Name</ttcol> <ttcol>Field Value</ttcol>
          <c>000</c> <c>54 5a 69 66</c> <c>magic</c> <c>"TZif"</c>
          <c>004</c> <c>33</c> <c>version</c> <c>'3' (3)</c>
          <c>005</c> <c>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</c> <c/> <c/>
          <c>020</c> <c>00 00 00 00</c> <c>isutccnt</c> <c>0</c>
          <c>024</c> <c>00 00 00 00</c> <c>isstdcnt</c> <c>0</c>
          <c>028</c> <c>00 00 00 00</c> <c>isleapcnt</c> <c>0</c>
          <c>032</c> <c>00 00 00 00</c> <c>timecnt</c> <c>0</c>
          <c>036</c> <c>00 00 00 00</c> <c>typecnt</c> <c>0</c>
          <c>040</c> <c>00 00 00 00</c> <c>charcnt</c> <c>0</c>
          <c/> <c/> <c/> <c/>

          <c>044</c> <c>54 5a 69 66</c> <c>magic</c> <c>"TZif"</c>
          <c>048</c> <c>33</c> <c>version</c> <c>'3' (3)</c>
          <c>049</c> <c>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</c> <c/> <c/>
          <c>064</c> <c>00 00 00 03</c> <c>isutccnt</c> <c>1</c>
          <c>068</c> <c>00 00 00 03</c> <c>isstdcnt</c> <c>1</c>
          <c>072</c> <c>00 00 00 00</c> <c>isleapcnt</c> <c>0</c>
          <c>076</c> <c>00 00 00 03</c> <c>timecnt</c> <c>1</c>
          <c>080</c> <c>00 00 00 03</c> <c>typecnt</c> <c>1</c>
          <c>084</c> <c>00 00 00 08</c> <c>charcnt</c> <c>4</c>
          <c/> <c/> <c/> <c/>

          <c>088</c> <c>00 00 00 00 7f e8 17 80</c> <c>trans time[0]</c>
          <c>2145916800 (2038-01-01T00:00:00Z)</c>
          <c/> <c/> <c/> <c/>

          <c>096</c> <c>00</c> <c>trans type[0]</c> <c>0</c>
          <c/> <c/> <c/> <c/>

          <c/> <c/> <c>localtimetype[0]</c> <c/>
          <c>097</c> <c>00 00 1c 20</c> <c>utcoff</c> <c>7200 (+02:00)</c>
          <c>101</c> <c>00</c> <c>isdst</c> <c>0 (no)</c>
          <c>102</c> <c>00</c> <c>desigidx</c> <c>0</c>
          <c/> <c/> <c/> <c/>

          <c>103</c> <c>49 53 54 00</c> <c>designations[0]</c> <c>"IST"</c>
          <c/> <c/> <c/> <c/>

          <c>107</c> <c>01</c> <c>UT/local[0]</c> <c>1 (UT)</c>
          <c/> <c/> <c/> <c/>

          <c>108</c> <c>01</c> <c>standard/wall[0]</c> <c>1 (standard)</c>
          <c/> <c/> <c/> <c/>

          <c>109</c> <c>0a</c> <c>NL</c> <c>'\n'</c>
          <c>110</c> <c>49 53 54 2d 32 49 44 54 2c
          4d 33 2e 34 2e 34 2f 32 36 2c 4d 31 30 2e 35 2e 30</c>
          <c>TZ string</c> <c>"IST-2IDT, M3.4.4/26,M10.5.0"</c>
          <c>136</c> <c>0a</c> <c>NL</c> <c>'\n'</c>
        </texttable>
      </section>

    </section>  <!-- examples -->
	
    <section title="Change History (To be removed by RFC Editor before
                    publication)">
      <t>Changes since -15:
      <list style='symbols'>
        <t>Addressed IESG comments from Ben Campbell.</t>
        <t>Addressed IESG comments from Spencer Dawkins.</t>
        <t>Addressed IESG comments from Benjamin Kaduk.</t>
        <t>Added annotated example files.</t>
        <t>Minor editorial changes.</t>
      </list>
      </t>

      <t>Changes since -14:
      <list style='symbols'>
        <t>Addressed last call comments from Tom Petch.</t>
        <t>Addressed last call comments from Qin Wu.</t>
        <t>Addressed last call comments from Dale Worley.</t>
      </list>
      </t>

      <t>Changes since -13:
      <list style='symbols'>
        <t>Added text to Privacy Considerations.</t>
      </list>
      </t>

      <t>Changes since -12:
      <list style='symbols'>
        <t>Added reference to RFC0020.</t>
        <t>Fully fleshed out application/tzif-leap declaration rather
        than referencing application/tzif.</t>
        <t>Added definition for "Leap Second Correction".</t>
        <t>Added external references directly to the relevant sections
        of POSIX.</t>
      </list>
      </t>

      <t>Changes since -11:
      <list style='symbols'>
        <t>Removed text requiring leapcnt by non-zero for
        application/tzif-leap files.</t>
      </list>
      </t>

      <t>Changes since -10:
      <list style='symbols'>
        <t>Removed text mandating all TZDIST features be supported.</t>
        <t>Minor editorial changes.</t>
      </list>
      </t>

      <t>Changes since -09:
      <list style='symbols'>
        <t>Removed "Update 7808" from header as this spec doesn't
        introduce new TZDIST functionality.</t>
        <t>Added text regarding truncation of TZif via TZDIST.</t>
        <t>Expanded what this spec DOESN'T define.</t>
        <t>Added reasons for some of the recommended practices.</t>
        <t>Added common interoperability issues appendix.</t>
        <t>Minor editorial changes.</t>
      </list>
      </t>

      <t>Changes since -08:
      <list style='symbols'>
        <t>Clarifying text regarding MIME types.</t>
        <t>Consolidated/referenced duplicate security and
        interoperability text.</t>
        <t>Switched to 'octets' instead of 'characters' when
        describing time zone designations.</t>
        <t>Minor editorial changes.</t>
      </list>
      </t>

      <t>Changes since -07:
      <list style='symbols'>
        <t>Clarifying text regarding TZ string.</t>
        <t>Added "application/tzif-leap" MIME media type.</t>
        <t>New reference for zic(8) man page.</t>
        <t>Minor editorial changes.</t>
      </list>
      </t>

      <t>Changes since -06:
      <list style='symbols'>
        <t>Added definition of UNIX Leap Time and used it to describe
        transition times and leap second occurrences.</t>
        <t>Moved TZif generation recommendations into discussion of
        version field.</t>
        <t>Repeated TZif generation recommendations in TZDIST section.</t>
        <t>Rewrote part of the TZ string text.</t>
        <t>Minor editorial changes.</t>
      </list>
      </t>

      <t>Changes since -05:
      <list style='symbols'>
        <t>Clarify TAI, leap seconds, some descriptions, and some field
        values/ranges with text from Paul Eggert.</t>
        <t>Refined MIME declaration based on feedback from Ned Freed.</t>
      </list>
      </t>

      <t>Changes since -04:
      <list style='symbols'>
        <t>Edited text discussing timestamps before first and after
        last transition.</t>
        <t>Specified legal range of time type indices and time zone
        designation indices.</t>
        <t>Notes that corrections in adjacent leap second records must
        differ by one.</t>
        <t>Added recommendations to eliminate unused space.</t>
        <t>Minor editorial changes.</t>
      </list>
      </t>

      <t>Changes since -03:
      <list style='symbols'>
        <t>Removed definition of GMT.</t>
        <t>Updated definitions of UTC, TAI, and UT</t>
        <t>Switched to using UT rather than UTC.</t>
        <t>Added more text about the use of standard/wall and UT/local
        indicators.</t>
        <t>Added Acknowledgments.</t>
        <t>Minor editorial changes.</t>
      </list>
      </t>

      <t>Changes since -02:
      <list style='symbols'>
        <t>Updated definitions of Standard Time and DST.</t>
        <t>Added definitions of GMT and UT.</t>
        <t>Added a definition of Time Zone Data from RFC7808.</t>
        <t>Removed sentence stating that TZDB is accurate.</t>
        <t>Added more text for standard/wall and UTC/local indicators
        and counts.</t>
        <t>Added text discussing timestamps before first and after
        last transition.</t>
        <t>Added more guidance text regarding 32-bit and 64-bit data
        consistency.</t>
        <t>Minor editorial changes.</t>
      </list>
      </t>

      <t>Changes since -01:
      <list style='symbols'>
        <t>Renamed "POSIX Time" to "UNIX Time" and noted that values
        can be negative.</t>
        <t>Noted that signed values MUST be represented using two's
        complement.</t>
        <t>Renamed "POSIX TZ string" to "TZ string" and noted that it
        can be empty.</t>
        <t>Moved TZ string extensions into its own subsection with
        examples.</t>
        <t>Renamed leap second "epoch" to "occurrence".</t>
        <t>Editorial changes from Paul Eggert.</t>
      </list>
      </t>

      <t>Changes since -00:
      <list style='symbols'>
        <t>Split TZif format description into a general overview and 3
        subsections.</t>
        <t>Updated Keywords boilerplate.</t>
        <t>Updated POSIX reference.</t>
        <t>Editorial changes from Eliot Lear.</t>
      </list>
      </t>
    </section>

  </back>
</rfc>
