Skip to content

Fix incorrect detection of local timezone

Latest

Choose a tag to compare

@Techcable Techcable released this 21 Aug 03:28
a6b6e7b

The time crate uses the Unix localtime_r call, which is not safe if multiple threads are running. To avoid undefined behavior, the time crate simply returns an error if multiple threads are running. To support localtime functionality when multiple threads are running, we use the chrono crate which parses /etc/localtime on Unix. This adds another dependency. In the future this could be mitigated by switching from time to chrono entirely.

This is not an issue on Windows systems.

Other changes: