Page MenuHomeFreeBSD

tzsetup: make UTC the first (default) region
ClosedPublic

Authored by brooks on Oct 27 2023, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 26, 3:17 AM
Unknown Object (File)
Fri, May 24, 5:18 PM
Unknown Object (File)
May 16 2024, 8:23 AM
Unknown Object (File)
May 12 2024, 4:16 AM
Unknown Object (File)
May 12 2024, 4:03 AM
Unknown Object (File)
May 12 2024, 4:03 AM
Unknown Object (File)
May 10 2024, 8:27 AM
Unknown Object (File)
Mar 22 2024, 7:51 PM
Subscribers

Details

Summary

Many system admins prefer to configure their systems to UTC and it's a
reasonable default when installing, making it easier to get a usable
system by just hitting <return> repeatidly.

Renumber UTC to 0 to preserve the finger memory of those selecting a
region by shortcut.

Diff Detail

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

Event Timeline

jrtc27 requested changes to this revision.Oct 27 2023, 8:07 PM
jrtc27 added inline comments.
usr.sbin/tzsetup/tzsetup.c
208

This is based off index in the array (yes, ew), so needs updating

This revision now requires changes to proceed.Oct 27 2023, 8:07 PM

The goal makes sense to me and I think this is now correct (maybe worth verifying you do see the right messages when selecting oceans vs continents?)

This revision is now accepted and ready to land.Oct 27 2023, 8:16 PM

The goal makes sense to me and I think this is now correct (maybe worth verifying you do see the right messages when selecting oceans vs continents?)

Hand checked and right headers are used. (Antarctica's message is a bit silly since Antarctica is one of the two choices and isn't a country, but that's something for another commit.)

emaste added inline comments.
usr.sbin/tzsetup/tzsetup.c
208

sigh, I'm not sure OCEANP makes anything clearer :)

usr.sbin/tzsetup/tzsetup.c
208

I'm slightly tempted to gratuitously define an enum or set of defines and then use designed initializers. Something like:

enum continents {
 c_UTC,
 ...
};

continent_names[] = {
 [c_UTC] = { "UTC",	&utc },
 ...
};
...

but probably not tempted enough to bother...

usr.sbin/tzsetup/tzsetup.c
208

I have thoughts for how to clean it up, but wasn't going to play around with it until after you'd committed this

This revision was automatically updated to reflect the committed changes.
usr.sbin/tzsetup/tzsetup.c
208

Yeah, I'd say get this review in and we can see about incremental improvement from there