]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tzcode: Implement timezone change detection
authorEdward Tomasz Napierala <trasz@FreeBSD.org>
Sun, 12 Sep 2021 03:07:26 +0000 (03:07 +0000)
committerDag-Erling Smørgrav <des@FreeBSD.org>
Tue, 31 Jan 2023 09:44:18 +0000 (10:44 +0100)
commitd3ed105942bbd8457e0c307ddc9d8ac95b365c2b
tree89e03cfb7d6bf3dba21f5cd74ae4a602631be9c4
parentf8986380049a998e78acf08a19db3c92edc78a88
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)
contrib/tzcode/stdtime/localtime.c
lib/libc/stdtime/Makefile.inc
share/mk/src.opts.mk
tools/build/options/WITH_DETECT_TZ_CHANGES [new file with mode: 0644]