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
POSIX doesn't guarantee that the timezone is set correctly before calling `localtime_r()`, so we need to call `tzset()` first to ensure that the timezone information is up-to-date.
As the glibc manual states:
> According to POSIX.1-2001, `localtime()` is required to behave as though `tzset(3)` was called, while `localtime_r()` does not
> have this requirement. For portable code, `tzset(3)` should be called before `localtime_r()`.
This change doesn't apply to Android, as from Android O and later Bionic libc handles timezone changes automatically.
0 commit comments