Page MenuHomeFreeBSD

makefs: Use gmtime() instead of localtime for timestamps
ClosedPublic

Authored by markj on May 6 2025, 3:59 PM.
Tags
None
Referenced Files
F163198868: D50198.diff
Mon, Jul 20, 11:51 PM
Unknown Object (File)
Tue, Jun 30, 1:24 AM
Unknown Object (File)
Mon, Jun 29, 11:46 AM
Unknown Object (File)
Sat, Jun 27, 2:34 AM
Unknown Object (File)
Fri, Jun 26, 10:07 PM
Unknown Object (File)
Tue, Jun 23, 1:56 PM
Unknown Object (File)
Mon, Jun 22, 6:45 PM
Unknown Object (File)
May 29 2026, 8:36 PM
Subscribers

Details

Summary

Otherwise the output file's contents will depend on the configured time
zone.

Sponsored by: Klara, Inc.
Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

markj requested review of this revision.May 6 2025, 3:59 PM

I wonder if it would make sense to use gmtime_r unconditionally?

I wonder if it would make sense to use gmtime_r unconditionally?

That would probably be fine. There's no real reason to expect the resulting image to be mounted in the same time zone as the host where it was created...

Anyhow I'm fine either as is or with only gmtime_r.

This revision is now accepted and ready to land.May 6 2025, 4:49 PM