Page MenuHomeFreeBSD

tzcode: Fix early tz change detection
ClosedPublic

Authored by des on Oct 31 2025, 5:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 21, 8:04 PM
Unknown Object (File)
Fri, Feb 20, 11:32 AM
Unknown Object (File)
Wed, Feb 18, 1:12 PM
Unknown Object (File)
Wed, Feb 18, 12:09 PM
Unknown Object (File)
Tue, Feb 17, 4:13 PM
Unknown Object (File)
Tue, Feb 17, 12:42 PM
Unknown Object (File)
Mon, Feb 16, 11:58 AM
Unknown Object (File)
Jan 29 2026, 11:20 AM
Subscribers

Details

Summary

Assume tzdata is not fresh if last_checked is zero, as comparing the
current time to last_checked less than __tz_change_interval after boot
may produce a false negative.

While here, invert the return value from tzdata_is_fresh() to better
match its new name (it was previously called recheck_tzdata(), so zero
for fresh and non-zero for stale made sense, but it doesn't now).

PR: 269207
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 68312
Build 65195: arc lint + arc unit

Event Timeline

des requested review of this revision.Oct 31 2025, 5:16 PM

initializing last_checked to TIME_T_MIN did not work, presumably because the subtraction overflowed, so explicitly check for zero instead.

This revision is now accepted and ready to land.Nov 2 2025, 12:14 AM
This revision was automatically updated to reflect the committed changes.