Page MenuHomeFreeBSD

libc: Improve description of mktime() / timegm().
ClosedPublic

Authored by des on Mar 26 2024, 3:37 AM.
Tags
None
Referenced Files
F132262246: D44503.diff
Wed, Oct 15, 7:21 AM
Unknown Object (File)
Sun, Oct 12, 5:09 PM
Unknown Object (File)
Sat, Oct 11, 10:07 AM
Unknown Object (File)
Sat, Oct 11, 2:23 AM
Unknown Object (File)
Sat, Oct 11, 2:23 AM
Unknown Object (File)
Sat, Oct 11, 2:23 AM
Unknown Object (File)
Fri, Oct 10, 7:39 PM
Unknown Object (File)
Sep 15 2025, 12:20 PM

Details

Summary
  • Mention that mktime() and timegm() set errno on failure.
  • Correctly determining whether mktime() / timegm() succeeded with arbitrary input (where -1 can be a valid result) is non-trivial. Document the recommended procedure.

PR: 277863
MFC after: 1 week

Diff Detail

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

Event Timeline

des requested review of this revision.Mar 26 2024, 3:37 AM

Grammar and spelling LGTM. Correctness (or portability) of the recommended error-checking is beyond my ken.

This revision is now accepted and ready to land.Mar 26 2024, 3:44 AM
gbe added a subscriber: gbe.

LGTM

Correctness (or portability) of the recommended error-checking is beyond my ken.

Don't worry, I take full responsibility for that :)

https://mm.icann.org/pipermail/tz/2024-March/058822.html