HomeFreeBSD

tzcode: Implement timezone change detection

Description

tzcode: Implement timezone change detection

Implement optional timezone change detection for local time libc
functions. This is disabled by default; set WITH_DETECT_TZ_CHANGES
to build it.

Reviewed By: imp
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
X-NetApp-PR: #47
Differential Revision: https://reviews.freebsd.org/D30183

(cherry picked from commit ddedf2a11eb20af1ee52cb3da70a57c21904af8f)

tzcode: Fix operation without WITH_DETECT_TZ_CHANGES

Reviewed By: bdrewery, kevans, cy
Reported By: lwhsu, bdrewery
Fixes: ddedf2a11eb
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D31961

(cherry picked from commit 6f43f86bf36dba158355593bab5f81a7f8e2773c)

tzcode: fix tz change detection logic

clock_gettime() returns 0 if it succeeds, so don't capture that into the
fail logic. With this, WITH_DETECT_TZ_CHANGES successfully detects a
change after 61 seconds.

Reviewed by: imp, trasz
Differential Revision: https://reviews.freebsd.org/D33494

(cherry picked from commit a2c51da6581dbc38c60c9fc41d1b624ff2c8de97)

Details

Provenance
traszAuthored on Sep 12 2021, 3:07 AM
desCommitted on Jan 31 2023, 9:44 AM
Reviewer
rGddedf2a11eb2: tzcode: Implement timezone change detection
Differential Revision
D30183: tzcode: Implement timezone change detection
Parents
rGf8986380049a: pfctl: rule.label is a two-dimensional array
Branches
Unknown
Tags
Unknown