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)
Fri, Mar 22, 7:51 PM
Unknown Object (File)
Feb 7 2024, 2:09 PM
Unknown Object (File)
Jan 1 2024, 4:53 PM
Unknown Object (File)
Jan 1 2024, 6:36 AM
Unknown Object (File)
Dec 25 2023, 5:25 PM
Unknown Object (File)
Dec 23 2023, 3:13 AM
Unknown Object (File)
Dec 14 2023, 7:16 PM
Unknown Object (File)
Dec 13 2023, 4:15 AM
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