New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
settimeofday is deprecated #957
Comments
More references: |
Some server software I know of checks in preference 1) NTP 2) Local time reference 3) The server's own RTC at boot to set the OS time, so hwclock or something similar is still useful there for scripting the logic. |
I also met the same issue when update glibc to 2.31 by run hwclock -s |
glibc announce: ... settimeofday can no longer be used to set the time and the offset simultaneously. If both of its two arguments are non-null, the call will fail (setting errno to EINVAL). It means we need to call settimeofday(NULL, tz) and settimeofday(tv, NULL). Unfortunately, settimeofday(NULL, tz) has very special warp-clock semantic if used as the very first settimeofday() call. It means we have to be sure that we do not touch warp-clock if we need only need to modify system TZ. So, let's always call settimeofday(NULL, 0) before settimeofday(NULL, tz) for UTC rtc mode when modify system TZ. CC: J William Piggott <elseifthen@gmx.com> Signed-off-by: Karel Zak <kzak@redhat.com> Addresses: #957
The version merged to master branch: cd781c4 Closing. |
https://sourceware.org/ml/libc-announce/2020/msg00001.html
https://forum.artixlinux.org/index.php/topic,1311.msg9203/topicseen.html#msg9203
The text was updated successfully, but these errors were encountered: