Page MenuHomeFreeBSD

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

Authored by des on Mar 26 2024, 3:37 AM.
Tags
None
Referenced Files
F159545777: D44503.diff
Mon, Jun 15, 2:20 PM
F159543958: D44503.id136210.diff
Mon, Jun 15, 1:56 PM
F159543957: D44503.id136210.diff
Mon, Jun 15, 1:56 PM
F159543797: D44503.id136257.diff
Mon, Jun 15, 1:55 PM
Unknown Object (File)
Tue, May 19, 9:32 AM
Unknown Object (File)
Sun, May 17, 11:37 PM
Unknown Object (File)
Sun, May 17, 11:37 PM
Unknown Object (File)
Sun, May 17, 11:17 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 56779
Build 53667: arc lint + arc unit

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

In D44503#1015085, @pauamma_gundo.com wrote:

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