You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in PR #44, the 'time' crate fails timezone detection
in the presence of multiple threads, because the underlying
POSIX function localtime_r is not thread safe.
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 suggesting this fix.
There are two improvements that could be made to reduce dependency bloat:
- Only enable this on unix systems
- Switch to chono entirely.
However, this fix is sufficient to avoid the bug and that is the priority.
It is possible that the optimizer is smart enough to remove all chrono code
except the localtime detection functionality.
In that case, switching from time to chrono could increase bloat
by pulling in two copies of time formatting code.
Tests/benchmarks are needed to determine the best approach.
0 commit comments