Page MenuHomeFreeBSD

tzcode: Use -00 only for invalid time zones
ClosedPublic

Authored by des on Mon, Sep 22, 5:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 9:55 AM
Unknown Object (File)
Fri, Oct 10, 3:30 AM
Unknown Object (File)
Fri, Oct 10, 3:30 AM
Unknown Object (File)
Fri, Oct 10, 3:30 AM
Unknown Object (File)
Fri, Oct 10, 3:30 AM
Unknown Object (File)
Thu, Oct 9, 10:27 PM
Unknown Object (File)
Wed, Oct 8, 5:18 PM
Unknown Object (File)
Fri, Oct 3, 1:05 PM
Subscribers

Details

Summary

As of tzcode 2025a, if we are unable to load a time zone, we set tzname
to "-00" to indicate an error. This penalizes users who simply don't
set TZ or create /etc/localtime as a faster way of setting the time zone
to UTC (pointing /etc/localtime at /usr/share/zoneinfo/UTC forces us to
parse it every time for no real benefit). To rectify this, use "-00"
only if TZ was set or zoneinit() returned something else than ENOENT.

MFC after: 3 days
Fixes: 967a49a21a27 ("Update tzcode to 2025b")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Mon, Sep 22, 5:15 PM

This makes sense. Thank you.

Is this from 2025a or from 2025b? I think it's from 2025b.

This revision is now accepted and ready to land.Tue, Sep 23, 12:20 AM
This revision now requires review to proceed.Tue, Sep 23, 11:18 AM

Is this from 2025a or from 2025b? I think it's from 2025b.

The switch from UTC to -00 happened in 2025a. We have 2025b. My patch has been accepted upstream and will be included in 2025c or 2026a.

Thanks for clarifying.

This looks good!

This revision is now accepted and ready to land.Tue, Sep 23, 11:36 AM
This revision was automatically updated to reflect the committed changes.