@@ -9,16 +9,14 @@ sets the epoch to be `{year}-01-01T00:00:00 UTC`.
99The epoch seconds is represented by an ` int32_t ` integer (instead of an
1010` int64_t ` used in most modern timezone libraries) to save resources on 8-bit
1111processors without native 64-bit integer instructions. The range of a 32-bit
12- integer is about 132 years which allows most features of the AceTime library to
13- work across at least a 100 -year (probably as large as 120-year) interval
14- straddling the current epoch year.
12+ integer is about 136 years which allows most features of the AceTime library to
13+ work across at least about a 120 -year interval straddling the current epoch
14+ year.
1515
16- The IANA TZ database is programmatically generated into the ` src/zonedb ` ,
17- ` src/zonedbx ` , and ` src/zonedbc ` subdirectories from the raw IANA TZ files. The
18- database entries are valid from the years ` [2000,10000) ` (` zonedb ` , ` zonedbx ` )
19- or ` [0001,10000) ` (` zonedbc ` ). By adjusting the ` currentEpochYear() ` , the
20- library will work across any 100-120 year interval straddling the current epoch
21- year, across the 8000 to 10000 year range of the TZ database.
16+ The IANA TZ database is programmatically generated into 3 predefined databases:
17+ ` src/zonedb ` , ` src/zonedbx ` , and ` src/zonedbc ` subdirectories. Different
18+ databases have different accuracy ranges, and are designed to work with
19+ different ` ZoneProcessor ` and ` ZoneManager ` classes.
2220
2321** Version** : 2.3.0 (2023-06-27, TZDB 2023c)
2422
@@ -102,20 +100,23 @@ year, across the 8000 to 10000 year range of the TZ database.
102100
103101The Date, Time, and TimeZone classes provide an abstraction layer to make it
104102easier to use and manipulate date and time fields, in different time zones. It
105- is difficult to organize the various parts of this library in the most easily
103+ is difficult to organize the various parts of this library in an easily
106104digestible way, but perhaps they can be categorized into three parts:
107105
108106* Simple Date and Time classes for converting date and time fields to and
109- from the "epoch seconds",
110- * TimeZone related classes which come in 2 forms:
111- * classes that extend the simple Date and Time classes that account for time
112- zones which can be described in a time zone database (e.g. ` TimeZone ` ,
113- ` ZonedDateTime ` , ` ZoneProcessor ` )
114- * classes and types that manage the TZ Database and provide access to its
115- data (e.g. ` ZoneManager ` , ` ZoneInfo ` , ` ZoneId ` )
116- * The ZoneInfo Database generated from the IANA TZ Database that contains UTC
117- offsets and the rules for determining when DST transitions occur for a
118- particular time zone
107+ from the "epoch seconds", for example:
108+ - ` acetime_t `
109+ - ` LocalDate ` , ` LocalTime ` , ` LocalDateTime ` , ` OffsetDateTime `
110+ - ` TimeOffset ` , ` TimePeriod `
111+ * TimeZone related classes, for example:
112+ - ` TimeZone ` , ` ZoneInfo `
113+ - ` ZonedDateTime ` , ` ZonedExtra `
114+ - ` BasicZoneProcessor ` , ` ExtendedZoneProcessor ` , ` CompleteZoneProcessor `
115+ - ` BasicZoneManager ` , ` ExtendedZoneManager ` , ` CompleteZoneManager `
116+ * ZoneInfo Databases generated from the IANA TZ Database
117+ * contains UTC offsets and the DST transition rules
118+ * ` zonedb/ ` , ` zonedbx/ ` , ` zonedbc/ ` databases
119+ * registries: ` kZoneRegistry ` , ` kZoneAndLinkRegistry `
119120
120121<a name =" DateAndTimeOverview " ></a >
121122### Date and Time Overview
@@ -158,10 +159,11 @@ Most timezone related functions of the library use the `int32_t` epochseconds
158159for its internal calculations, so the date range should be constrained to +/- 68
159160years of the current epoch. The timezone calculations require some additional
160161buffers at the edges of the range (1-3 years), so the actual range of validity
161- is about +/- 65 years. To be very conservative, client applications are advised
162- to limit the date range to about 100 years, in other words, about +/- 50 years
163- from the current epoch year. Using the default epoch year of 2050, the
164- recommended range is ` [2000,2100) ` .
162+ is about +/- 65 years. To be conservative, client applications are advised to
163+ limit the date range to about 100-120 years, in other words, about +/- 50 to 60
164+ years from the current epoch year. Using the default epoch year of 2050, the
165+ recommended range is ` [2000,2100) ` because a 100-year interval is easy to
166+ remember.
165167
166168<a name =" TimeZoneOverview " ></a >
167169### TimeZone Overview
@@ -223,8 +225,8 @@ Three slightly different sets of ZoneInfo entries are generated:
223225 * contains ` kZoneId* ` identifiers (e.g. ` kZoneIdAfrica_Casablanca ` )
224226* [ zonedbc/zone_infos.h] ( src/zonedbc/zone_infos.h )
225227 * intended for ` CompleteZoneProcessor ` or ` CompleteZoneManager `
226- * all 596 (as of version 2023c) in the IANA TZ Database
227- over the vast years of ` [0001,10000) `
228+ * all 596 (as of version 2023c) in the IANA TZ Database over the years of
229+ ` [0001,10000) `
228230 * contains ` kZone* ` declarations (e.g. ` kZoneAfrica_Casablanca ` )
229231 * contains ` kZoneId* ` identifiers (e.g. ` kZoneIdAfrica_Casablanca ` )
230232
@@ -337,7 +339,7 @@ with several major differences:
337339It is possible to convert between a ` time_t ` and an ` acetime_t ` by adding or
338340subtracting the number of seconds between the 2 Epoch dates. This value is given
339341by ` Epoch::secondsToCurrentEpochFromUnixEpoch64() ` which returns an ` int64_t `
340- value to allow epoch years greater than 2038. If the date is within +/- 50 years
342+ value to allow epoch years greater than 2038. If the date is within +/- 60 years
341343of the current epoch year, then the resulting epoch seconds will fit inside a
342344` int32_t ` integer. Helper methods are available on various classes to avoid
343345manual conversion between these 2 epochs: ` forUnixSeconds64() ` and
@@ -3344,8 +3346,8 @@ Serial.println(dt.isError() ? "true" : "false");
33443346 dates that can be represented by ` acetime_t ` is theoretically
33453347 1981-12-13T20:45:53 UTC to 2118-01-20T03:14:07 UTC (inclusive).
33463348 * To be conservative, users of this library should limit the range of the
3347- epoch seconds to +/- 50 years of the current epoch, in other words,
3348- ` [2000,2100) ` .
3349+ epoch seconds to +/- 60 years of the current epoch, in other words,
3350+ ` [1990,2110) ` , or even easier to remember, ` [ 2000,2100)` .
33493351* ` LocalDate ` , ` LocalDateTime `
33503352 * The class checks that the ` year ` component in the range of `[ 0,
33513353 10000] ` , which is a smaller range than the ` [ -32767,32765] ` range
@@ -3390,8 +3392,8 @@ Serial.println(dt.isError() ? "true" : "false");
33903392 as well as it could be, and the algorithm may change in the future. To keep
33913393 the code size within reasonble limits of a small Arduino controller, the
33923394 algorithm may be permanently sub-optimal.
3393- * ` ZonedDateTime ` objects should remain within roughly +/- 50 years (maybe +/-
3394- 60 years) of the current AceTime Epoch.
3395+ * ` ZonedDateTime ` objects should remain within roughly +/- 60 years of the
3396+ current AceTime Epoch.
33953397 * Otherwise, internal integer variables may overflow without warning
33963398 and incorrect results may be calculated.
33973399 * The internal time zone calculations use the same ` int32_t ` type as the
0 commit comments