0 | module IotaTime.Tzdb.Windows.Types
 1 |
 2 | import IotaTime.TimeZone.Core
 3 |
 4 | %default total
 5 |
 6 | ||| Recurring SYSTEMTIME fields used by Windows TZI registry values.
 7 | public export
 8 | record WindowsTransitionDate where
 9 |   constructor MkWindowsTransitionDate
10 |   year : Integer
11 |   month : Integer
12 |   week : Integer
13 |   weekday : Integer
14 |   hour : Integer
15 |   minute : Integer
16 |   second : Integer
17 |
18 | ||| The recurring portion of a Windows REG_TZI_FORMAT value. Bias fields are
19 | ||| minutes added to local time to obtain UTC, following Windows conventions.
20 | public export
21 | record WindowsZoneRule where
22 |   constructor MkWindowsZoneRule
23 |   biasMinutes : Integer
24 |   standardBiasMinutes : Integer
25 |   daylightBiasMinutes : Integer
26 |   standardName : String
27 |   daylightName : String
28 |   daylightStart : WindowsTransitionDate
29 |   standardStart : WindowsTransitionDate
30 |
31 | ||| A Dynamic DST registry value effective from January 1 of its year.
32 | public export
33 | record WindowsDynamicRule where
34 |   constructor MkWindowsDynamicRule
35 |   effectiveYear : Integer
36 |   dynamicRule : WindowsZoneRule
37 |
38 | ||| Platform-neutral data read from one Windows time-zone registry key.
39 | public export
40 | record WindowsRegistryZone where
41 |   constructor MkWindowsRegistryZone
42 |   registryZoneId : String
43 |   registryStandardName : String
44 |   registryDaylightName : String
45 |   registryDefaultTzi : List Bits8
46 |   registryDynamicTzi : List (Integer, List Bits8)
47 |
48 | ||| Complete result emitted by a native Windows registry source.
49 | public export
50 | record WindowsRegistrySnapshot where
51 |   constructor MkWindowsRegistrySnapshot
52 |   snapshotLocalZoneId : String
53 |   snapshotZones : List WindowsRegistryZone
54 |
55 | public export
56 | data WindowsZoneError
57 |   = WindowsOffsetOutOfRange Integer
58 |   | WindowsTimeOutOfRange Integer Integer Integer
59 |   | WindowsTransitionMillisecondsUnsupported Integer
60 |   | WindowsAbsoluteTransitionUnsupported Integer
61 |   | IncompleteWindowsDaylightRule
62 |   | WindowsTziLength Integer
63 |   | WindowsRecurrenceError RecurrenceRuleError
64 |
65 | public export
66 | data WindowsTimeZoneError
67 |   = InvalidWindowsRule WindowsZoneError
68 |   | InvalidWindowsTransitions TimeZoneError
69 |   | DynamicYearsNotStrictlyIncreasing
70 |
71 | public export
72 | data WindowsRegistryError
73 |   = InvalidDefaultTzi WindowsZoneError
74 |   | InvalidDynamicTzi Integer WindowsZoneError
75 |   | InvalidRegistryTimeZone WindowsTimeZoneError
76 |
77 | public export
78 | data WindowsRegistryProtocolError
79 |   = MissingLocalZoneId
80 |   | UnexpectedRegistryLine String
81 |   | InvalidRegistryHex String
82 |   | InvalidDynamicRegistryLine String
83 |   | IncompleteRegistryZone
84 |