Releases: bxparks/AceTime
Releases · bxparks/AceTime
v1.5 - officially support STM32; upgrade to TZ DB 2021a; implement fat Links
- 1.5
- Use binary search for both
ZoneManager::createForZoneName()
and
ZoneManager::createForZoneId()
.- Previously, the
zone_registry.cpp
was sorted by zoneName, so only
thecreateForZoneName()
could use the binary search. The new
solution sorts thezone_registry.cpp
entries byzoneId
instead of
zoneName
. ThecreateForZoneId()
can use the binary search
algorith. - The
createForZoneName()
can also use the binary search because
thezoneName
is converted dynamically to itszoneId
using the same
djb2 hash algorithm used by thetzcompiler.py
. If there is a match,
a final verification against the exactzoneName
is performed to make
sure that there was no hash collision. - Updated
AutoBenchmark.ino
to determine that a binary search on the
266 zones inzonedb/zone_registry.cpp
is 9-10X faster (on average)
than a linear search through the same list. (Linear search takes ~190
iterations; binary search takes ~9 iterations.)
- Previously, the
- Upgrade Link entries to be "fat links".
- Links become essentially identical to Zone entries, with references to
the same underlyingZoneEra
records. - Add
kZoneAndLinkRegistry[]
array inzone_registry.h
that contains
all Links as well as Zones. - Add "Zones and Links" section in
USER_GUIDE.md
.
- Links become essentially identical to Zone entries, with references to
- Implement zoneName compression using
ace_common::KString
.- Saves about 1500-2300 bytes for basic
zonedb
info files, and
2500-3400 bytes for extendedzonedbx
info files.
- Saves about 1500-2300 bytes for basic
- Potentially Breaking Change: Remove
transitionBufSize
from
ZoneInfo
struct, and migrate tokZoneBufSize{xxx}
constants in the
zone_infos.h
files.- This was used only in validation tests under
tests/validation
and
only forExtended{xxx}
tests. Saves 1 byte per Zone on 8-bit
processors, but none on 32-bit processors due to 4-byte alignment. - This should have no impact on client code since this field was used
only for validation testing.
- This was used only in validation tests under
- API Breaking Change: Replace
BasicZone::name()
andshortName()
withprintNameTo()
andprintShortNameTo()
. Same with
ExtendedZone::name()
andshortName()
, replaced withprintNameTo()
andprintShortNameTo()
.- After implementing zoneName compression, it was no longer possible to
return a simple pointer to thename
andshortName
without using
static memory buffers. - I expect almost no one to be using the
BasicZone
andExtendedZone
classes, since they are mostly useful for internal algorithms. - Client code that needs the old functionality can use
BasicZone::printNameTo(Print&)
,
BasicZone::printShortNameTo(Print&)
(similarly forExtendedZone
)
to print to aace_common::PrintStr<>
object, then extract the
c-string usingPrintStr::getCstr()
.
- After implementing zoneName compression, it was no longer possible to
- Update UnixHostDuino 0.4 to EpoxyDuino 0.5.
- Explicitly blacklist megaAVR boards, and SAMD21 boards using
arduino:samd
Core >= 1.8.10.- This allows a helpful message to be shown to the user, instead of the
pages and pages of compiler errors.
- This allows a helpful message to be shown to the user, instead of the
- Update TZ Database to 2021a.
- https://mm.icann.org/pipermail/tz-announce/2021-January/000065.html
- "South Sudan changes from +03 to +02 on 2021-02-01 at 00:00."
- Officially support STM32 and STM32duino after testing on STM32 Blue Pill.
- Use binary search for both
v1.4.1 - actually upgrade zonedb and zonedbx files to 2020f
- 1.4.1 (2020-12-30, TZDB version 2020f for real)
- Actually update
src/ace_time/zonedb
andsrc/ace_time/zonedbx
zone info files to 2020f. Oops.
- Actually update
v1.4 - upgrade to tzdata 2020f; prelim support for STM32; huge refactoring of tools
- 1.4 (2020-12-30, TZ DB version 2020f)
- Add entry for
ManualZoneManager
in
examples/MemoryBenchmark. It seems to need
between 0'ish to 250 bytes of flash. - Add support for creating and handling a
TimePeriod
error object.- Add
kMaxPeriodSeconds
andkInvalidPeriodSeconds
constants. - Add
forError()
factory method. - Add error checking to
toSeconds()
andTimePeriod(seconds)
constructor. - Printing an error object prints
<Invalid TimePeriod>
.
- Add
- Add support for the STM32RTC clock on an STM32 through the
ace_time::clock::StmRtcClock
class.- Currently experimental and untested.
- I do not have any STM32 boards right now, so I cannot test this code.
- See #39 for details.
- Thanks to Anatoli Arkhipenko (arkhipenko@).
- Add convenience factory methods for creating manual
TimeZone
objects.
Saves a lot of typing by avoiding theTimeOffset
objects:TimeZone::forHours()
TimeZone::forMinutes()
TimeZone::forHourMinute()
- Fix incorrect
kTypeXxx
constants inZoneManager.h
. Fortunately, the
numerical values overlapped perfectly, so didn't cause any bugs in actual
code. USER_GUIDE.md
- Add documentation about accessing the meta information about the
zonedb
andzonedbx
databases:zonedb::kTzDatabaseVersion
zonedb::kZoneContext.startYear
zonedb::kZoneContext.untilYear
zonedbx::kTzDatabaseVersion
zonedbx::kZoneContext.startYear
zonedbx::kZoneContext.untilYear
- Add documentation that the
ZonedDateTime
must always be within
startYear
anduntilYear
. An error object will be returned outside
of that range.
- Add documentation about accessing the meta information about the
- Update TZ Database from 2020d to version 2020f
- 2020e
- https://mm.icann.org/pipermail/tz-announce/2020-December/000063.html
- "Volgograd switches to Moscow time on 2020-12-27 at 02:00."
- 2020f
- https://mm.icann.org/pipermail/tz-announce/2020-December/000064.html
- "'make rearguard_tarballs' no longer generates a bad rearguard.zi,
fixing a 2020e bug. (Problem reported by Deborah Goldsmith.)"
- AceTime skips 2020e
- 2020e
- Update
examples/AutoBenchmark
to allow auto-generation of ASCII tables,
which allows auto-generation of theREADME.md
file. Update CPU
benchmarks for v1.4 from v0.8, since it is much easier to update these
numbers now. No significant performance change from v0.8. - Huge amounts of Python
tools
refactoring- Convert all remaining
%
string formatting to f-strings. - Convert all internal camelCase dictionary keys to snake_case for
consistency. - Finish adding typing info to pass strict mypy checking.
- Centralize most typing info into
data_types/at_types.py
. - Move various global constants into
data_types/at_types.py
. - Migrate most Arduino specific transformations into
artransformer.py
. - Move offsetCode, deltaCode, atTimeCode, untilTimeCode, rulesDeltaCode
calculations and various bit-packing rules (e.g.at_time_modifier
,
ntil_time_modifier
) intoartransformer.py
instead of the
argenerator.py
. - Include general and platform specific transformations in
the JSON (zonedb.json
orzonedbx.json
) files. - Make
argenerator.py
use only the JSON output instead of making
its own transformations. - Produce both
LettersMap
andLettersPerPolicy
in the JSON file. - Unify
CommentsCollection
intoCommentsMap
using anIterable
inDict[str, Iterable[str]]
. - Unify all transformer results into
TransformerResult
. - Check hash collisions for Link names, in addition to Zone names.
- Rename test data generator executables to
generate_data.*
or some
variations of it, to avoid confusion with unit tests which are often
namedtest_xxx.py
. - Add
--input_dir
flag togenerate_data.cpp
to allow the TZ database
directory to be specified. - Add
--ignore_buf_size_too_big
to workaround a mismatch between
the estimated Transition buffer size calculated bybufestimator.py
and the actual buffer size required byExtendedZoneProcessor.cpp
. - Add
--skip_checkout
flag totzcompiler.py
to allow local
modifications of the TZ database files to be used for code generation. - Add
--delta_granularity
flag totransformer.py
to decouple it
from--offset_granularity
, so that theSAVE
andRULES
granularity can be controlled independently from theSTDOFF
granularity. The--until_at_granularity
continues to controlAT
andUNTIL
. - Make output of
zinfo.py --debug
to be more readable. - Remove
--generate_zone_strings
fromtzcompiler.py
which removes
the ability to createzone_strings.{h,cpp}
. The storage and
optimization of strings are implementation details which seem to be
better handled later in the pipeline. - Increase the range of
zonedbpy
database from the default
[2000,2050)
to[1974, 2050)
to allowzinfo.py
to handle a larger
range of queries. - Merge
--action
and--language
flags fortzcompiler.py
; only
--language
flag needed right now. - Rename
RulesMap
toPoliciesMap
,rules_map
topolicies_map
,
rule_name
topolicy_name
etc. For consistency withZonesMap
,
zones_map
, andzone_name
. - Add
ZoneId
hashes to JSON output files.
- Convert all remaining
- Add entry for
v1.3 - better ZoneId support using ZoneManager interface
- 1.3 (2020-11-30, TZ DB version 2020d)
- Minor tweaks to silence clang++ warnings.
- Create new
ZoneManager
interface (pure virtual) which is now the
non-templatized parent to bothBasicZoneManager
and
ExtendedZoneManager
. AllowsZoneManager
to be passed around
poloymorphically as a pointer or reference. - Fix broken
ZoneManager::indexForZoneName()
and
ZoneManager::indexForZoneId()
caused by incorrect implementations in
BasicZoneRegistrar
andExtendedZoneRegistrar
. - Generate compile-time zoneIds for all zones in the form of
zonedb::kZoneId{Zone_Name}
andzonedbx::kZoneId{Zone_Name}
(e.g.
zonedb::kZoneIdAmerica_Los_Angeles
). Can be given directly to
ZoneManager::createForZoneId()
. - Add constructors to
TimeZoneData
to allow initializers to set
union members. Useful for initializing arrays ofTimeZoneData
. - Add
ManualZoneManager
implementation ofZoneManager
which implements
onlycreateForTimeZoneData()
. Useful in applications which support only
TimeZone::kTypeManual
(fixed std and dst offsets) due to memory
constaints. - Add documentation of
TimeZoneData
,TimeZone::toTimeZoneData()
, and
ZoneManager::createFromTimeZoneData()
toUSER_GUIDE.md
. Looks like I
added the class in v0.5 but forgot to document it. - Implement
LocalDateTime::compareTo()
using only its components instead
of internally converting to epochSeconds. Not allLocalDateTime
can be
represented by an epochSeconds, so this change makes the algorithm more
robust. The semantics of the method should remain unchanged. - Update the doxygen docs of the
compareTo()
methods ofLocalDateTime
,
LocalTime
,LocalDate
,OffsetDateTime
andZonedDateTime
to clarify
the semantics of those operations.
v1.2.1 - add Table of Contents to USER_GUIDE.md
- 1.2.1 (2020-11-12, TZ DB version 2020d)
- No functional change in this release. Mostly documentation.
- Update
examples/MemoryBenchmark
numbers from v0.8 to v1.2 with
new auto-generator scripts. - Add Table of Contents to
USER_GUIDE.md
to help navigate the long
document.
v1.2 - migrate low-level common code to AceCommon library
- 1.2 (2020-10-31, TZ DB version 2020d)
- Potentially Breaking: AceTime library now depends on the AceCommon
library (https://github.com/bxparks/AceCommon) to avoid having to maintain
multiple copies of various utility functions and classes. The API for most
(if not all) public classes have not changed. A number of internal helper
classes have moved to the AceCommon library. If you happen to directly use
some of these, you need to use the AceCommon library instead.- Add dependency to AceCommon to all Makefiles.
- Add a
depends
attribute tolibrary.properties
.
- Replace various utlity functions and class with those from AceCommon:
class TimingStats
incrementMod()
,incrementModOffset()
,printPad2To()
,
printPad3To()
strcmp_PP()
strchr_P()
,strrchr_P()
for ESP8266 and ESP32PrintStr
- Move
common/CrcEeprom.h
to AceUtils
(https://github.com/bxparks/AceUtils) library.
- Potentially Breaking: AceTime library now depends on the AceCommon
1.1.2 - upgrade to TZDB 2020d
- 1.1.2 (2020-10-25, TZ DB version 2020d)
- Move examples/WorldClock, examples/OledClock and examples/CommandLineClock
to a new repo (https://github.com/bxparks/clocks). - Update
src/ace_time/zonedb
andsrc/ace_time/zonedbx
to TZDB 2020d
(https://mm.icann.org/pipermail/tz-announce/2020-October/000062.html).- "Palestine ends DST earlier than predicted, on 2020-10-24."
- Move examples/WorldClock, examples/OledClock and examples/CommandLineClock
1.1.1 - Upgrade to TZDB version 2020c
- 1.1.1 (2020-10-18, TZ DB version 2020c)
- Add documentation for using the
PrintStr<N>
class from the AceUtils
library (https://github.com:bxparks/AceUtils) on the variousprintTo()
methods. The string content can be retrieved using the
PrintStr::getCstr()
method which returns a normalconst char*
C-string. ThePrintStr<N>
class replaces an earlier, unreleased version
that was calledCstrPrint<N>
. - Add 'Validation Tests' GitHub workflow for running
tests/validation/*Test
. - Create
blacklist.json
file for eachcompare_xxx
tools, to disable
validation checks for DST or abbreviations due to bugs in the 3rd party
libraries. - Add
ValidationScope
enum to provide better control over whether the
DST or abbrev fields are validated. - Print better diagnostic messages when
tests/validation
fails in
BasicTransitionTest
andExtendedTransitionTest
classes. - Upgrade target version numbers of 3rd party libraries used for
tests/validation: pytz from 2019.3 to 2020.1, JDK 11.0.6 to 11.0.8. - Upgrade to TZDB 2020c.
- Restrict GitHub Actions workflow to run just BasicHinnantDateTest and
ExtendedHinnantDateTest, because the other Python and Java tests break
every time a new TZDB version comes out. - Add
DEVELOPER.md
file containing notes mostly for myself.
- Add documentation for using the
upgrade to TZ DB version 2020a
- 1.1 (2020-04-25, TZ DB version 2020a)
- Fix broken links in
README.md
. - Fix typos in
USER_GUIDE.md
and update its version number to 1.0 as it
should have been back in October. - Massive refactor of
./tools
processing pipeline and update
validation/tests
.- Add mypy strict type checking for Python scripts under
tools
. - Funnel
validation*.{h,cpp}
code generation through a single program
using avalidation_data.json
intermediate file. - Funnel processing of TZDB output from
transformer.py
into a single
tzdbcollector.py
which can produce atzdb.json
output. - Separate
validator.py
processing into a distinct section.
- Add mypy strict type checking for Python scripts under
- Add validation tests against Python
dateutil
library (similar to
pytz
). - Update TZ Database version to 2020a that was released on 2020-04-23.
- Fix broken links in
1.0 - graduate to 1.0 with TZ DB version 2019c
- 1.0 (2019-10-02, TZ DB version 2019c)
- Add initial support for GitHub actions to implement continuous integration
using the unit tests that run under UnitHostDuino. - Allow NtpClock to use an existing WiFi connection. Add
examples/HelloNtpClock/
to demonstrate this. (#24, thanks
@denis-stepanov). - Fix compiler warning about duplicate
FPSTR()
macro for ESP32 Core
version >=1.0.3. - Generate the zonedb files for the various
validation/*Test
integration
tests on-demand, instead of using the zonedb files checked into
src/ace_time/zonedb[x]
. This allows us to match the version of the TZ
Database used by AceTime to the version used by Java 11, pytz, and Hinnant
Date, independently of the version that is generated into
src/ace_time/zonedb[x]
. - Update
src/ace_time/zonedb[x]
files to TZ version 2019c. - Graduate to version 1.0.
- Add initial support for GitHub actions to implement continuous integration