@@ -41,17 +41,25 @@ import Control.Monad (mplus)
42-- | @OlsonData@ represents a full set of timezone data for a location.
42-- | @OlsonData@ represents a full set of timezone data for a location.
44−-- @OlsonData@ can represent timezone data from files in Version 1 format
44+-- @OlsonData@ can represent timezone data from files in Version 1, 2,
45−-- or Version 2 format. Version 1 format files can only contain timestamp
45+-- or 3 format.
46−-- values that can be represented in less than 32 bits, and cannot contain
47+-- Version 1 format files can only contain timestamp values that can
48+-- be represented in less than 32 bits, and cannot contain a POSIX TZ
49−-- In a Version 2 format file, the timezone data is split into two parts.
51+-- In a Version 2 format file, the timezone data is split into two
50−-- The first part contains timezone data for which all timestamp values
52+-- parts. The first part contains timezone data for which all
51−-- can be represented in less than 32 bits, and the second part contains
53+-- timestamp values can be represented in less than 32 bits, and the
52−-- timezone data for which 32 bits or more are required to represent
54+-- second part contains timezone data for which 32 bits or more are
53−-- timestamp values. The POSIX TZ string, if present, can only be rendered
55+-- required to represent timestamp values. The POSIX TZ string, if
56+-- present, can only be rendered in a Version 2 file, and appears
54−-- in a Version 2 file, and appears after both parts of the timezone data.
57+-- after both parts of the timezone data.
59+-- Version 3 format files relax certain syntax requirements for the
60+-- POSIX TZ string. Since we represent the POSIX TZ string as an
61+-- unparsed 'String', Version 3 is identical to Version 2 for our
55data OlsonData =
63data OlsonData =
56 OlsonData {
64 OlsonData {
57 olsonTransitions :: [Transition],
65 olsonTransitions :: [Transition],