@@ -4,7 +4,7 @@ The primary purpose of AceTime classes is to convert between an integer
44representing the number of seconds since the AceTime Epoch (2000-01-01T00:00:00
55UTC) and the equivalent human-readable components in different timezones.
66
7- ** Version** : 1.11.3 (2021-03.20 , TZDB 2022a )
7+ ** Version** : 1.11.4 (2022-08-13 , TZDB 2022b )
88
99** Related Documents** :
1010
@@ -1869,6 +1869,11 @@ epochSeconds which can correspond to the given LocalDateTime. The `fold`
18691869parameter is an *input* parameter to the `forComponents()` in both cases.
18701870The impact of the `fold` parameter is as follows:
18711871
1872+ **Normal**: Not a gap or overlap. The `forComponents()` method ignores the
1873+ `fold` parameter if there is no ambiguity about the local date-time components.
1874+ The returned `ZonedDateTime` object will contain a `fold()` value that preserves
1875+ the input `fold` parameter.
1876+
18721877**Overlap**: If `ZonedDateTime::forComponents()` is called with during an
18731878overlap of `LocalDateTime` (e.g. 2:30am during a fall back from 2am to 3am), the
18741879factory method uses the user-provided `fold` parameter to select the following:
@@ -1896,20 +1901,26 @@ the following, and perhaps counter-intuitive, manner:
18961901 * Which becomes normalized to the *later* ZonedDateTime which has the
18971902 *later* UTC offset.
18981903 * So 02:30 is interpreted as 02:30-08:00, which is normalized to
1899- 03:30-07:00, and the `fold` after normalization is set to 0.
1904+ 03:30-07:00, and the `fold` after normalization is set to 1 to indicate
1905+ that the later transition was selected.
19001906* `fold==1`
19011907 * Selects the *later* Transition element, extended backward to apply to the
19021908 given LocalDateTime,
19031909 * Which maps to the *earlier* UTC/epochSeconds,
19041910 * Which becomes normalized to the *earlier* ZonedDateTime which has the
19051911 *earlier* UTC offset.
19061912 * So 02:30 is interpreted as 02:30-07:00, which is normalized to
1907- 01:30-08:00, and the `fold` after normalization is set to 0.
1913+ 01:30-08:00, and the `fold` after normalization is set to 0 to indicate
1914+ that the earlier transition was selected.
19081915
19091916The time shift during a gap seems to be the *opposite* of the shift during an
19101917overlap, but internally this is self-consistent. Just as importantly, this
19111918follows the same logic as PEP 495.
19121919
1920+ Note that the `fold` parameter flips its value (from 0 to 1, or vise versea) if
1921+ `forComponents()` is called in the gap. Currently, this is the only publicly
1922+ exposed mechanism for detecting that a given date-time is in the gap.
1923+
19131924<a name="SemanticChangesWithFold"></a>
19141925#### Semantic Changes with Fold
19151926
@@ -1945,8 +1956,8 @@ A more subtle, but important semantic change, is that the `fold` parameter
19451956preserves information during gaps and overlaps. This means that we can do
19461957round-trip conversions of `ZonedDateTime` properly. We can start with
19471958epochSeconds, convert to components, then back to epochSeconds, and get back the
1948- same epochSeconds. With the `fold` parameter, this round-trip was not guaranteed
1949- during an overlap.
1959+ same epochSeconds. Without the `fold` parameter, this round-trip was not
1960+ guaranteed during an overlap.
19501961
19511962<a name="ResourceConsumptionWithFold"></a>
19521963#### Resource Consumption with Fold
@@ -2046,8 +2057,8 @@ in the `transformer.py` script and summarized in
20462057* the UNTIL time suffix can only be 'w' (not 's' or 'u')
20472058* there can be only one DST transition in a single month
20482059
2049- As of version v1.11.3 (with TZDB 2022a ), this database contains 258 Zone entries
2050- and 193 Link entries, supported from the year 2000 to 2049 (inclusive).
2060+ As of version v1.11.4 (with TZDB 2022b ), this database contains 237 Zone entries
2061+ and 215 Link entries, supported from the year 2000 to 2049 (inclusive).
20512062
20522063<a name =" ExtendedZonedbx " ></a >
20532064#### Extended zonedbx
@@ -2063,8 +2074,8 @@ are:
20632074* the AT and UNTIL fields are multiples of 1-minute
20642075* the LETTER field can be arbitrary strings
20652076
2066- As of version v1.11.3 (with TZDB 2022a ), this database contains all 377 Zone
2067- entries and 217 Link entries, supported from the year 2000 to 2049 (inclusive).
2077+ As of version v1.11.4 (with TZDB 2022b ), this database contains all 356 Zone
2078+ entries and 239 Link entries, supported from the year 2000 to 2049 (inclusive).
20682079
20692080<a name =" TzDatabaseVersion " ></a >
20702081#### TZ Database Version
0 commit comments