term
term copied to clipboard
Use chrono to detect local timezone thread-safely
As discussed in PR #44, the 'time' crate fails timezine detection
in the prsesense of multiple threads, because the underlying
POSIX function localtime_r is not thread safe (at least not on Linux).
In order to avoid these thread-safety issues, we use the chrono crate. It avoids system libraries and reimplements timezone detection from scratch. (Thanks to @yaozongyou for pointing this out)
TODO: Maybe we should switch to chono entirely. It seems to be a fairly complete replacement. What are the advantages & disadvantages?
This superceeds PR #44