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)
Wed, Oct 23, 10:40 AM
Unknown Object (File)
Oct 6 2024, 4:11 PM
Unknown Object (File)
Sep 27 2024, 9:22 AM
Unknown Object (File)
Sep 24 2024, 11:35 AM
Unknown Object (File)
Sep 20 2024, 2:03 AM
Unknown Object (File)
Sep 19 2024, 1:45 PM
Unknown Object (File)
Sep 19 2024, 5:16 AM
Unknown Object (File)
Sep 18 2024, 8:01 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