Date and time classes for Arduino supporting the IANA TZ Database time zones to convert epoch seconds to date and time components in different time zones.
Required updating zoneino/compat.h to clobber the broken definition
of FPSTR() in Seeeduino 1.8.3.
Simplify the handling of Rule.LETTER.
Encode all letters as an index into ZoneContext.letters array, not
just LETTER which are only a single character.
On 8-bit AVR:
Increases BasicZoneProcessor by ~200 bytes when 1-2 zones are
used. But flash remains the same when the full TZ database is
used.
No change to ExtendedZoneProcessor for 1-2 zones. But decreases
flash usage by ~300 bytes when the full TZ database is used.
The small increase in flash is worth it because this greatly
simplifies the complicated code surrounding LETTER that was difficult
to understand and maintain.
Unify Basic and Extended zoneinfo encoding.
Change encoding of basic::ZoneRule.deltaCode,
basic::ZoneEra.deltaCode, and basic::ZoneEra.offsetCode to be
identical their counterparts in extended::ZoneXxx.
Merge BasicBrokers.h and ExtendedBrokers.h into just Brokers.h.
Restructure zonedb directories
Lift ace_time/internal/testing/tzonedb[x] database files
to ace_time/tzonedb[x].
Lift ace_time/zonedb[x] database files to ace_time/zonedb[x].
These changes are transparent to client apps because the C++
namespaces of these files are unchanged.
Lift ace_time/internal/Zone*.h files into new src/zoneinfo/
directory. These are the classes that describe the *zonedb*
databases.
Add ZonedDateTime::offsetDateTime()
Returns the underlying OffsetDateTime inside the ZonedDateTime.
Analogous to ZonedDateTime::localDateTime().
Always generate anchor rules in zonedb.
Allows ExtendedZoneProcessor to work over all years [0,10000)
even with truncated zonedb (e.g. [2000,2100)).
Accuracy is guaranteed only for the requested interval (e.g.
[2000,2100).
But the code won't crash outside of that interval.
TimeZone::forMinutes()
fromuint8_t
touint16_t
.TimeZone
effectively immutable, by removingsetStdOffset()
andsetDstOffset()
methods.TimeZone
object usingTimeZone::forTimeOffset(std, dst)
and overwrite the old one.zoneino/compat.h
to clobber the broken definition ofFPSTR()
in Seeeduino 1.8.3.Rule.LETTER
.ZoneContext.letters
array, not justLETTER
which are only a single character.BasicZoneProcessor
by ~200 bytes when 1-2 zones are used. But flash remains the same when the full TZ database is used.ExtendedZoneProcessor
for 1-2 zones. But decreases flash usage by ~300 bytes when the full TZ database is used.basic::ZoneRule.deltaCode
,basic::ZoneEra.deltaCode
, andbasic::ZoneEra.offsetCode
to be identical their counterparts inextended::ZoneXxx
.BasicBrokers.h
andExtendedBrokers.h
into justBrokers.h
.ace_time/internal/testing/tzonedb[x]
database files toace_time/tzonedb[x]
.ace_time/zonedb[x]
database files toace_time/zonedb[x]
.ace_time/internal/Zone*.h
files into newsrc/zoneinfo/
directory. These are the classes that describe the*zonedb*
databases.ZonedDateTime::offsetDateTime()
OffsetDateTime
inside theZonedDateTime
.ZonedDateTime::localDateTime()
.ExtendedZoneProcessor
to work over all years[0,10000)
even with truncated zonedb (e.g.[2000,2100)
).[2000,2100)
.