14616d0f9Sopenharmony_citzfile(5) File Formats Manual tzfile(5) 24616d0f9Sopenharmony_ci 34616d0f9Sopenharmony_ciNAME 44616d0f9Sopenharmony_ci tzfile - timezone information 54616d0f9Sopenharmony_ci 64616d0f9Sopenharmony_ciDESCRIPTION 74616d0f9Sopenharmony_ci The timezone information files used by tzset(3) are typically found 84616d0f9Sopenharmony_ci under a directory with a name like /usr/share/zoneinfo. These files 94616d0f9Sopenharmony_ci use the format described in Internet RFC 8536. Each file is a sequence 104616d0f9Sopenharmony_ci of 8-bit bytes. In a file, a binary integer is represented by a 114616d0f9Sopenharmony_ci sequence of one or more bytes in network order (bigendian, or high- 124616d0f9Sopenharmony_ci order byte first), with all bits significant, a signed binary integer 134616d0f9Sopenharmony_ci is represented using two's complement, and a boolean is represented by 144616d0f9Sopenharmony_ci a one-byte binary integer that is either 0 (false) or 1 (true). The 154616d0f9Sopenharmony_ci format begins with a 44-byte header containing the following fields: 164616d0f9Sopenharmony_ci 174616d0f9Sopenharmony_ci o The magic four-byte ASCII sequence "TZif" identifies the file as a 184616d0f9Sopenharmony_ci timezone information file. 194616d0f9Sopenharmony_ci 204616d0f9Sopenharmony_ci o A byte identifying the version of the file's format (as of 2021, 214616d0f9Sopenharmony_ci either an ASCII NUL, "2", "3", or "4"). 224616d0f9Sopenharmony_ci 234616d0f9Sopenharmony_ci o Fifteen bytes containing zeros reserved for future use. 244616d0f9Sopenharmony_ci 254616d0f9Sopenharmony_ci o Six four-byte integer values, in the following order: 264616d0f9Sopenharmony_ci 274616d0f9Sopenharmony_ci tzh_ttisutcnt 284616d0f9Sopenharmony_ci The number of UT/local indicators stored in the file. (UT 294616d0f9Sopenharmony_ci is Universal Time.) 304616d0f9Sopenharmony_ci 314616d0f9Sopenharmony_ci tzh_ttisstdcnt 324616d0f9Sopenharmony_ci The number of standard/wall indicators stored in the file. 334616d0f9Sopenharmony_ci 344616d0f9Sopenharmony_ci tzh_leapcnt 354616d0f9Sopenharmony_ci The number of leap seconds for which data entries are stored 364616d0f9Sopenharmony_ci in the file. 374616d0f9Sopenharmony_ci 384616d0f9Sopenharmony_ci tzh_timecnt 394616d0f9Sopenharmony_ci The number of transition times for which data entries are 404616d0f9Sopenharmony_ci stored in the file. 414616d0f9Sopenharmony_ci 424616d0f9Sopenharmony_ci tzh_typecnt 434616d0f9Sopenharmony_ci The number of local time types for which data entries are 444616d0f9Sopenharmony_ci stored in the file (must not be zero). 454616d0f9Sopenharmony_ci 464616d0f9Sopenharmony_ci tzh_charcnt 474616d0f9Sopenharmony_ci The number of bytes of time zone abbreviation strings stored 484616d0f9Sopenharmony_ci in the file. 494616d0f9Sopenharmony_ci 504616d0f9Sopenharmony_ci The above header is followed by the following fields, whose lengths 514616d0f9Sopenharmony_ci depend on the contents of the header: 524616d0f9Sopenharmony_ci 534616d0f9Sopenharmony_ci o tzh_timecnt four-byte signed integer values sorted in ascending 544616d0f9Sopenharmony_ci order. These values are written in network byte order. Each is 554616d0f9Sopenharmony_ci used as a transition time (as returned by time(2)) at which the 564616d0f9Sopenharmony_ci rules for computing local time change. 574616d0f9Sopenharmony_ci 584616d0f9Sopenharmony_ci o tzh_timecnt one-byte unsigned integer values; each one but the 594616d0f9Sopenharmony_ci last tells which of the different types of local time types 604616d0f9Sopenharmony_ci described in the file is associated with the time period 614616d0f9Sopenharmony_ci starting with the same-indexed transition time and continuing up 624616d0f9Sopenharmony_ci to but not including the next transition time. (The last time 634616d0f9Sopenharmony_ci type is present only for consistency checking with the 644616d0f9Sopenharmony_ci POSIX.1-2017-style TZ string described below.) These values 654616d0f9Sopenharmony_ci serve as indices into the next field. 664616d0f9Sopenharmony_ci 674616d0f9Sopenharmony_ci o tzh_typecnt ttinfo entries, each defined as follows: 684616d0f9Sopenharmony_ci 694616d0f9Sopenharmony_ci struct ttinfo { 704616d0f9Sopenharmony_ci int32_t tt_utoff; 714616d0f9Sopenharmony_ci unsigned char tt_isdst; 724616d0f9Sopenharmony_ci unsigned char tt_desigidx; 734616d0f9Sopenharmony_ci }; 744616d0f9Sopenharmony_ci 754616d0f9Sopenharmony_ci Each structure is written as a four-byte signed integer value 764616d0f9Sopenharmony_ci for tt_utoff, in network byte order, followed by a one-byte 774616d0f9Sopenharmony_ci boolean for tt_isdst and a one-byte value for tt_desigidx. In 784616d0f9Sopenharmony_ci each structure, tt_utoff gives the number of seconds to be added 794616d0f9Sopenharmony_ci to UT, tt_isdst tells whether tm_isdst should be set by 804616d0f9Sopenharmony_ci localtime(3) and tt_desigidx serves as an index into the array 814616d0f9Sopenharmony_ci of time zone abbreviation bytes that follow the ttinfo entries 824616d0f9Sopenharmony_ci in the file; if the designated string is "-00", the ttinfo entry 834616d0f9Sopenharmony_ci is a placeholder indicating that local time is unspecified. The 844616d0f9Sopenharmony_ci tt_utoff value is never equal to -2**31, to let 32-bit clients 854616d0f9Sopenharmony_ci negate it without overflow. Also, in realistic applications 864616d0f9Sopenharmony_ci tt_utoff is in the range [-89999, 93599] (i.e., more than -25 874616d0f9Sopenharmony_ci hours and less than 26 hours); this allows easy support by 884616d0f9Sopenharmony_ci implementations that already support the POSIX-required range 894616d0f9Sopenharmony_ci [-24:59:59, 25:59:59]. 904616d0f9Sopenharmony_ci 914616d0f9Sopenharmony_ci o tzh_charcnt bytes that represent time zone designations, which 924616d0f9Sopenharmony_ci are null-terminated byte strings, each indexed by the 934616d0f9Sopenharmony_ci tt_desigidx values mentioned above. The byte strings can 944616d0f9Sopenharmony_ci overlap if one is a suffix of the other. The encoding of 954616d0f9Sopenharmony_ci these strings is not specified. 964616d0f9Sopenharmony_ci 974616d0f9Sopenharmony_ci o tzh_leapcnt pairs of four-byte values, written in network byte 984616d0f9Sopenharmony_ci order; the first value of each pair gives the nonnegative time 994616d0f9Sopenharmony_ci (as returned by time(2)) at which a leap second occurs or at 1004616d0f9Sopenharmony_ci which the leap second table expires; the second is a signed 1014616d0f9Sopenharmony_ci integer specifying the correction, which is the total number 1024616d0f9Sopenharmony_ci of leap seconds to be applied during the time period starting 1034616d0f9Sopenharmony_ci at the given time. The pairs of values are sorted in strictly 1044616d0f9Sopenharmony_ci ascending order by time. Each pair denotes one leap second, 1054616d0f9Sopenharmony_ci either positive or negative, except that if the last pair has 1064616d0f9Sopenharmony_ci the same correction as the previous one, the last pair denotes 1074616d0f9Sopenharmony_ci the leap second table's expiration time. Each leap second is 1084616d0f9Sopenharmony_ci at the end of a UTC calendar month. The first leap second has 1094616d0f9Sopenharmony_ci a nonnegative occurrence time, and is a positive leap second 1104616d0f9Sopenharmony_ci if and only if its correction is positive; the correction for 1114616d0f9Sopenharmony_ci each leap second after the first differs from the previous 1124616d0f9Sopenharmony_ci leap second by either 1 for a positive leap second, or -1 for 1134616d0f9Sopenharmony_ci a negative leap second. If the leap second table is empty, 1144616d0f9Sopenharmony_ci the leap-second correction is zero for all timestamps; 1154616d0f9Sopenharmony_ci otherwise, for timestamps before the first occurrence time, 1164616d0f9Sopenharmony_ci the leap-second correction is zero if the first pair's 1174616d0f9Sopenharmony_ci correction is 1 or -1, and is unspecified otherwise (which can 1184616d0f9Sopenharmony_ci happen only in files truncated at the start). 1194616d0f9Sopenharmony_ci 1204616d0f9Sopenharmony_ci o tzh_ttisstdcnt standard/wall indicators, each stored as a one- 1214616d0f9Sopenharmony_ci byte boolean; they tell whether the transition times 1224616d0f9Sopenharmony_ci associated with local time types were specified as standard 1234616d0f9Sopenharmony_ci time or local (wall clock) time. 1244616d0f9Sopenharmony_ci 1254616d0f9Sopenharmony_ci o tzh_ttisutcnt UT/local indicators, each stored as a one-byte 1264616d0f9Sopenharmony_ci boolean; they tell whether the transition times associated 1274616d0f9Sopenharmony_ci with local time types were specified as UT or local time. If 1284616d0f9Sopenharmony_ci a UT/local indicator is set, the corresponding standard/wall 1294616d0f9Sopenharmony_ci indicator must also be set. 1304616d0f9Sopenharmony_ci 1314616d0f9Sopenharmony_ci The standard/wall and UT/local indicators were designed for 1324616d0f9Sopenharmony_ci transforming a TZif file's transition times into transitions 1334616d0f9Sopenharmony_ci appropriate for another time zone specified via a 1344616d0f9Sopenharmony_ci POSIX.1-2017-style TZ string that lacks rules. For example, when 1354616d0f9Sopenharmony_ci TZ="EET-2EEST" and there is no TZif file "EET-2EEST", the idea was 1364616d0f9Sopenharmony_ci to adapt the transition times from a TZif file with the well-known 1374616d0f9Sopenharmony_ci name "posixrules" that is present only for this purpose and is a 1384616d0f9Sopenharmony_ci copy of the file "Europe/Brussels", a file with a different UT 1394616d0f9Sopenharmony_ci offset. POSIX does not specify this obsolete transformational 1404616d0f9Sopenharmony_ci behavior, the default rules are installation-dependent, and no 1414616d0f9Sopenharmony_ci implementation is known to support this feature for timestamps past 1424616d0f9Sopenharmony_ci 2037, so users desiring (say) Greek time should instead specify 1434616d0f9Sopenharmony_ci TZ="Europe/Athens" for better historical coverage, falling back on 1444616d0f9Sopenharmony_ci TZ="EET-2EEST,M3.5.0/3,M10.5.0/4" if POSIX conformance is required 1454616d0f9Sopenharmony_ci and older timestamps need not be handled accurately. 1464616d0f9Sopenharmony_ci 1474616d0f9Sopenharmony_ci The localtime(3) function normally uses the first ttinfo structure 1484616d0f9Sopenharmony_ci in the file if either tzh_timecnt is zero or the time argument is 1494616d0f9Sopenharmony_ci less than the first transition time recorded in the file. 1504616d0f9Sopenharmony_ci 1514616d0f9Sopenharmony_ci Version 2 format 1524616d0f9Sopenharmony_ci For version-2-format timezone files, the above header and data are 1534616d0f9Sopenharmony_ci followed by a second header and data, identical in format except that 1544616d0f9Sopenharmony_ci eight bytes are used for each transition time or leap second time. 1554616d0f9Sopenharmony_ci (Leap second counts remain four bytes.) After the second header and 1564616d0f9Sopenharmony_ci data comes a newline-enclosed string in the style of the contents of a 1574616d0f9Sopenharmony_ci POSIX.1-2017 TZ environment variable, for use in handling instants 1584616d0f9Sopenharmony_ci after the last transition time stored in the file or for all instants 1594616d0f9Sopenharmony_ci if the file has no transitions. The TZ string is empty (i.e., nothing 1604616d0f9Sopenharmony_ci between the newlines) if there is no POSIX.1-2017-style representation 1614616d0f9Sopenharmony_ci for such instants. If nonempty, the TZ string must agree with the 1624616d0f9Sopenharmony_ci local time type after the last transition time if present in the eight- 1634616d0f9Sopenharmony_ci byte data; for example, given the string "WET0WEST,M3.5.0/1,M10.5.0" 1644616d0f9Sopenharmony_ci then if a last transition time is in July, the transition's local time 1654616d0f9Sopenharmony_ci type must specify a daylight-saving time abbreviated "WEST" that is one 1664616d0f9Sopenharmony_ci hour east of UT. Also, if there is at least one transition, time type 1674616d0f9Sopenharmony_ci 0 is associated with the time period from the indefinite past up to but 1684616d0f9Sopenharmony_ci not including the earliest transition time. 1694616d0f9Sopenharmony_ci 1704616d0f9Sopenharmony_ci Version 3 format 1714616d0f9Sopenharmony_ci For version-3-format timezone files, the TZ string may use two minor 1724616d0f9Sopenharmony_ci extensions to the POSIX.1-2017 TZ format, as described in newtzset(3). 1734616d0f9Sopenharmony_ci First, the hours part of its transition times may be signed and range 1744616d0f9Sopenharmony_ci from -167 through 167 instead of the POSIX-required unsigned values 1754616d0f9Sopenharmony_ci from 0 through 24. Second, DST is in effect all year if it starts 1764616d0f9Sopenharmony_ci January 1 at 00:00 and ends December 31 at 24:00 plus the difference 1774616d0f9Sopenharmony_ci between daylight saving and standard time. 1784616d0f9Sopenharmony_ci 1794616d0f9Sopenharmony_ci Version 4 format 1804616d0f9Sopenharmony_ci For version-4-format TZif files, the first leap second record can have 1814616d0f9Sopenharmony_ci a correction that is neither +1 nor -1, to represent truncation of the 1824616d0f9Sopenharmony_ci TZif file at the start. Also, if two or more leap second transitions 1834616d0f9Sopenharmony_ci are present and the last entry's correction equals the previous one, 1844616d0f9Sopenharmony_ci the last entry denotes the expiration of the leap second table instead 1854616d0f9Sopenharmony_ci of a leap second; timestamps after this expiration are unreliable in 1864616d0f9Sopenharmony_ci that future releases will likely add leap second entries after the 1874616d0f9Sopenharmony_ci expiration, and the added leap seconds will change how post-expiration 1884616d0f9Sopenharmony_ci timestamps are treated. 1894616d0f9Sopenharmony_ci 1904616d0f9Sopenharmony_ci Interoperability considerations 1914616d0f9Sopenharmony_ci Future changes to the format may append more data. 1924616d0f9Sopenharmony_ci 1934616d0f9Sopenharmony_ci Version 1 files are considered a legacy format and should not be 1944616d0f9Sopenharmony_ci generated, as they do not support transition times after the year 2038. 1954616d0f9Sopenharmony_ci Readers that understand only Version 1 must ignore any data that 1964616d0f9Sopenharmony_ci extends beyond the calculated end of the version 1 data block. 1974616d0f9Sopenharmony_ci 1984616d0f9Sopenharmony_ci Other than version 1, writers should generate the lowest version number 1994616d0f9Sopenharmony_ci needed by a file's data. For example, a writer should generate a 2004616d0f9Sopenharmony_ci version 4 file only if its leap second table either expires or is 2014616d0f9Sopenharmony_ci truncated at the start. Likewise, a writer not generating a version 4 2024616d0f9Sopenharmony_ci file should generate a version 3 file only if TZ string extensions are 2034616d0f9Sopenharmony_ci necessary to accurately model transition times. 2044616d0f9Sopenharmony_ci 2054616d0f9Sopenharmony_ci The sequence of time changes defined by the version 1 header and data 2064616d0f9Sopenharmony_ci block should be a contiguous sub-sequence of the time changes defined 2074616d0f9Sopenharmony_ci by the version 2+ header and data block, and by the footer. This 2084616d0f9Sopenharmony_ci guideline helps obsolescent version 1 readers agree with current 2094616d0f9Sopenharmony_ci readers about timestamps within the contiguous sub-sequence. It also 2104616d0f9Sopenharmony_ci lets writers not supporting obsolescent readers use a tzh_timecnt of 2114616d0f9Sopenharmony_ci zero in the version 1 data block to save space. 2124616d0f9Sopenharmony_ci 2134616d0f9Sopenharmony_ci When a TZif file contains a leap second table expiration time, TZif 2144616d0f9Sopenharmony_ci readers should either refuse to process post-expiration timestamps, or 2154616d0f9Sopenharmony_ci process them as if the expiration time did not exist (possibly with an 2164616d0f9Sopenharmony_ci error indication). 2174616d0f9Sopenharmony_ci 2184616d0f9Sopenharmony_ci Time zone designations should consist of at least three (3) and no more 2194616d0f9Sopenharmony_ci than six (6) ASCII characters from the set of alphanumerics, "-", and 2204616d0f9Sopenharmony_ci "+". This is for compatibility with POSIX requirements for time zone 2214616d0f9Sopenharmony_ci abbreviations. 2224616d0f9Sopenharmony_ci 2234616d0f9Sopenharmony_ci When reading a version 2 or higher file, readers should ignore the 2244616d0f9Sopenharmony_ci version 1 header and data block except for the purpose of skipping over 2254616d0f9Sopenharmony_ci them. 2264616d0f9Sopenharmony_ci 2274616d0f9Sopenharmony_ci Readers should calculate the total lengths of the headers and data 2284616d0f9Sopenharmony_ci blocks and check that they all fit within the actual file size, as part 2294616d0f9Sopenharmony_ci of a validity check for the file. 2304616d0f9Sopenharmony_ci 2314616d0f9Sopenharmony_ci When a positive leap second occurs, readers should append an extra 2324616d0f9Sopenharmony_ci second to the local minute containing the second just before the leap 2334616d0f9Sopenharmony_ci second. If this occurs when the UTC offset is not a multiple of 60 2344616d0f9Sopenharmony_ci seconds, the leap second occurs earlier than the last second of the 2354616d0f9Sopenharmony_ci local minute and the minute's remaining local seconds are numbered 2364616d0f9Sopenharmony_ci through 60 instead of the usual 59; the UTC offset is unaffected. 2374616d0f9Sopenharmony_ci 2384616d0f9Sopenharmony_ci Common interoperability issues 2394616d0f9Sopenharmony_ci This section documents common problems in reading or writing TZif 2404616d0f9Sopenharmony_ci files. Most of these are problems in generating TZif files for use by 2414616d0f9Sopenharmony_ci older readers. The goals of this section are: 2424616d0f9Sopenharmony_ci 2434616d0f9Sopenharmony_ci o to help TZif writers output files that avoid common pitfalls in 2444616d0f9Sopenharmony_ci older or buggy TZif readers, 2454616d0f9Sopenharmony_ci 2464616d0f9Sopenharmony_ci o to help TZif readers avoid common pitfalls when reading files 2474616d0f9Sopenharmony_ci generated by future TZif writers, and 2484616d0f9Sopenharmony_ci 2494616d0f9Sopenharmony_ci o to help any future specification authors see what sort of problems 2504616d0f9Sopenharmony_ci arise when the TZif format is changed. 2514616d0f9Sopenharmony_ci 2524616d0f9Sopenharmony_ci When new versions of the TZif format have been defined, a design goal 2534616d0f9Sopenharmony_ci has been that a reader can successfully use a TZif file even if the 2544616d0f9Sopenharmony_ci file is of a later TZif version than what the reader was designed for. 2554616d0f9Sopenharmony_ci When complete compatibility was not achieved, an attempt was made to 2564616d0f9Sopenharmony_ci limit glitches to rarely used timestamps and allow simple partial 2574616d0f9Sopenharmony_ci workarounds in writers designed to generate new-version data useful 2584616d0f9Sopenharmony_ci even for older-version readers. This section attempts to document 2594616d0f9Sopenharmony_ci these compatibility issues and workarounds, as well as to document 2604616d0f9Sopenharmony_ci other common bugs in readers. 2614616d0f9Sopenharmony_ci 2624616d0f9Sopenharmony_ci Interoperability problems with TZif include the following: 2634616d0f9Sopenharmony_ci 2644616d0f9Sopenharmony_ci o Some readers examine only version 1 data. As a partial 2654616d0f9Sopenharmony_ci workaround, a writer can output as much version 1 data as 2664616d0f9Sopenharmony_ci possible. However, a reader should ignore version 1 data, and 2674616d0f9Sopenharmony_ci should use version 2+ data even if the reader's native timestamps 2684616d0f9Sopenharmony_ci have only 32 bits. 2694616d0f9Sopenharmony_ci 2704616d0f9Sopenharmony_ci o Some readers designed for version 2 might mishandle timestamps 2714616d0f9Sopenharmony_ci after a version 3 or higher file's last transition, because they 2724616d0f9Sopenharmony_ci cannot parse extensions to POSIX.1-2017 in the TZ-like string. As 2734616d0f9Sopenharmony_ci a partial workaround, a writer can output more transitions than 2744616d0f9Sopenharmony_ci necessary, so that only far-future timestamps are mishandled by 2754616d0f9Sopenharmony_ci version 2 readers. 2764616d0f9Sopenharmony_ci 2774616d0f9Sopenharmony_ci o Some readers designed for version 2 do not support permanent 2784616d0f9Sopenharmony_ci daylight saving time with transitions after 24:00 - e.g., a TZ 2794616d0f9Sopenharmony_ci string "EST5EDT,0/0,J365/25" denoting permanent Eastern Daylight 2804616d0f9Sopenharmony_ci Time (-04). As a workaround, a writer can substitute standard 2814616d0f9Sopenharmony_ci time for two time zones east, e.g., "XXX3EDT4,0/0,J365/23" for a 2824616d0f9Sopenharmony_ci time zone with a never-used standard time (XXX, -03) and negative 2834616d0f9Sopenharmony_ci daylight saving time (EDT, -04) all year. Alternatively, as a 2844616d0f9Sopenharmony_ci partial workaround a writer can substitute standard time for the 2854616d0f9Sopenharmony_ci next time zone east - e.g., "AST4" for permanent Atlantic Standard 2864616d0f9Sopenharmony_ci Time (-04). 2874616d0f9Sopenharmony_ci 2884616d0f9Sopenharmony_ci o Some readers designed for version 2 or 3, and that require strict 2894616d0f9Sopenharmony_ci conformance to RFC 8536, reject version 4 files whose leap second 2904616d0f9Sopenharmony_ci tables are truncated at the start or that end in expiration times. 2914616d0f9Sopenharmony_ci 2924616d0f9Sopenharmony_ci o Some readers ignore the footer, and instead predict future 2934616d0f9Sopenharmony_ci timestamps from the time type of the last transition. As a 2944616d0f9Sopenharmony_ci partial workaround, a writer can output more transitions than 2954616d0f9Sopenharmony_ci necessary. 2964616d0f9Sopenharmony_ci 2974616d0f9Sopenharmony_ci o Some readers do not use time type 0 for timestamps before the 2984616d0f9Sopenharmony_ci first transition, in that they infer a time type using a heuristic 2994616d0f9Sopenharmony_ci that does not always select time type 0. As a partial workaround, 3004616d0f9Sopenharmony_ci a writer can output a dummy (no-op) first transition at an early 3014616d0f9Sopenharmony_ci time. 3024616d0f9Sopenharmony_ci 3034616d0f9Sopenharmony_ci o Some readers mishandle timestamps before the first transition that 3044616d0f9Sopenharmony_ci has a timestamp not less than -2**31. Readers that support only 3054616d0f9Sopenharmony_ci 32-bit timestamps are likely to be more prone to this problem, for 3064616d0f9Sopenharmony_ci example, when they process 64-bit transitions only some of which 3074616d0f9Sopenharmony_ci are representable in 32 bits. As a partial workaround, a writer 3084616d0f9Sopenharmony_ci can output a dummy transition at timestamp -2**31. 3094616d0f9Sopenharmony_ci 3104616d0f9Sopenharmony_ci o Some readers mishandle a transition if its timestamp has the 3114616d0f9Sopenharmony_ci minimum possible signed 64-bit value. Timestamps less than -2**59 3124616d0f9Sopenharmony_ci are not recommended. 3134616d0f9Sopenharmony_ci 3144616d0f9Sopenharmony_ci o Some readers mishandle TZ strings that contain "<" or ">". As a 3154616d0f9Sopenharmony_ci partial workaround, a writer can avoid using "<" or ">" for time 3164616d0f9Sopenharmony_ci zone abbreviations containing only alphabetic characters. 3174616d0f9Sopenharmony_ci 3184616d0f9Sopenharmony_ci o Many readers mishandle time zone abbreviations that contain non- 3194616d0f9Sopenharmony_ci ASCII characters. These characters are not recommended. 3204616d0f9Sopenharmony_ci 3214616d0f9Sopenharmony_ci o Some readers may mishandle time zone abbreviations that contain 3224616d0f9Sopenharmony_ci fewer than 3 or more than 6 characters, or that contain ASCII 3234616d0f9Sopenharmony_ci characters other than alphanumerics, "-", and "+". These 3244616d0f9Sopenharmony_ci abbreviations are not recommended. 3254616d0f9Sopenharmony_ci 3264616d0f9Sopenharmony_ci o Some readers mishandle TZif files that specify daylight-saving 3274616d0f9Sopenharmony_ci time UT offsets that are less than the UT offsets for the 3284616d0f9Sopenharmony_ci corresponding standard time. These readers do not support 3294616d0f9Sopenharmony_ci locations like Ireland, which uses the equivalent of the TZ string 3304616d0f9Sopenharmony_ci "IST-1GMT0,M10.5.0,M3.5.0/1", observing standard time (IST, +01) 3314616d0f9Sopenharmony_ci in summer and daylight saving time (GMT, +00) in winter. As a 3324616d0f9Sopenharmony_ci partial workaround, a writer can output data for the equivalent of 3334616d0f9Sopenharmony_ci the TZ string "GMT0IST,M3.5.0/1,M10.5.0", thus swapping standard 3344616d0f9Sopenharmony_ci and daylight saving time. Although this workaround misidentifies 3354616d0f9Sopenharmony_ci which part of the year uses daylight saving time, it records UT 3364616d0f9Sopenharmony_ci offsets and time zone abbreviations correctly. 3374616d0f9Sopenharmony_ci 3384616d0f9Sopenharmony_ci o Some readers generate ambiguous timestamps for positive leap 3394616d0f9Sopenharmony_ci seconds that occur when the UTC offset is not a multiple of 60 3404616d0f9Sopenharmony_ci seconds. For example, in a timezone with UTC offset +01:23:45 and 3414616d0f9Sopenharmony_ci with a positive leap second 78796801 (1972-06-30 23:59:60 UTC), 3424616d0f9Sopenharmony_ci some readers will map both 78796800 and 78796801 to 01:23:45 local 3434616d0f9Sopenharmony_ci time the next day instead of mapping the latter to 01:23:46, and 3444616d0f9Sopenharmony_ci they will map 78796815 to 01:23:59 instead of to 01:23:60. This 3454616d0f9Sopenharmony_ci has not yet been a practical problem, since no civil authority has 3464616d0f9Sopenharmony_ci observed such UTC offsets since leap seconds were introduced in 3474616d0f9Sopenharmony_ci 1972. 3484616d0f9Sopenharmony_ci 3494616d0f9Sopenharmony_ci Some interoperability problems are reader bugs that are listed here 3504616d0f9Sopenharmony_ci mostly as warnings to developers of readers. 3514616d0f9Sopenharmony_ci 3524616d0f9Sopenharmony_ci o Some readers do not support negative timestamps. Developers of 3534616d0f9Sopenharmony_ci distributed applications should keep this in mind if they need to 3544616d0f9Sopenharmony_ci deal with pre-1970 data. 3554616d0f9Sopenharmony_ci 3564616d0f9Sopenharmony_ci o Some readers mishandle timestamps before the first transition that 3574616d0f9Sopenharmony_ci has a nonnegative timestamp. Readers that do not support negative 3584616d0f9Sopenharmony_ci timestamps are likely to be more prone to this problem. 3594616d0f9Sopenharmony_ci 3604616d0f9Sopenharmony_ci o Some readers mishandle time zone abbreviations like "-08" that 3614616d0f9Sopenharmony_ci contain "+", "-", or digits. 3624616d0f9Sopenharmony_ci 3634616d0f9Sopenharmony_ci o Some readers mishandle UT offsets that are out of the traditional 3644616d0f9Sopenharmony_ci range of -12 through +12 hours, and so do not support locations 3654616d0f9Sopenharmony_ci like Kiritimati that are outside this range. 3664616d0f9Sopenharmony_ci 3674616d0f9Sopenharmony_ci o Some readers mishandle UT offsets in the range [-3599, -1] seconds 3684616d0f9Sopenharmony_ci from UT, because they integer-divide the offset by 3600 to get 0 3694616d0f9Sopenharmony_ci and then display the hour part as "+00". 3704616d0f9Sopenharmony_ci 3714616d0f9Sopenharmony_ci o Some readers mishandle UT offsets that are not a multiple of one 3724616d0f9Sopenharmony_ci hour, or of 15 minutes, or of 1 minute. 3734616d0f9Sopenharmony_ci 3744616d0f9Sopenharmony_ciSEE ALSO 3754616d0f9Sopenharmony_ci time(2), localtime(3), tzset(3), tzselect(8), zdump(8), zic(8). 3764616d0f9Sopenharmony_ci 3774616d0f9Sopenharmony_ci Olson A, Eggert P, Murchison K. The Time Zone Information Format 3784616d0f9Sopenharmony_ci (TZif). 2019 Feb. Internet RFC 8536 doi:10.17487/RFC8536. 3794616d0f9Sopenharmony_ci 3804616d0f9Sopenharmony_ciTime Zone Database tzfile(5) 381