Skip to content

Upgrade the "time" crate to 0.2.x

Yorick Peterse requested to merge time-02 into master

Version 0.2.x of the "time" crate comes with an API that is quite different from version 0.1.x. This commit upgrades Inko to this new AP. As version 0.2.x does not support checking if DST is active, support for this has been removed. DST support is tricky, as it can vary based on where you are, politics (e.g. some countries may drop it), etc.

As part of upgrading to time 0.2.x, some of the internals for obtaining timestamps has been changed. In particular, obtaining a timestamp and UTC offset has been merged into a single VM instruction. This should ensure that no funny business happens when obtaining a timestamp but not obtaining the UTC offset until a later point in time. The downside is having to allocate an array object, but the overhead of this should be minor.

This fixes #188 (closed)

Merge request reports