LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   What if the time zone is not set during installation? (https://www.linuxquestions.org/questions/slackware-14/what-if-the-time-zone-is-not-set-during-installation-4175675773/)

Didier Spaier 05-23-2020 04:42 PM

What if the time zone is not set during installation?
 
In next version of the Slint installer I want to provide a mode that needs as less user interaction as possible, at the price of more post-installation configuration.

Some distributions' installers propose a timezone based on the IP geolocation and I've found a handy application to do that: https://github.com/cdown/tzupdate so I have considered including it in the installer, but that would need to ship also python and python-setuptools in it, furthermore I have no guarantee that the user's machine can have an Internet connection at time of installation.

Is there any issue delaying the timezone setting after installation? I consider suggesting users to run after installation a script that does:
Code:

tzupdate -p # prints the timezone found with IP geolocation; if found and OK then tzupdate; else ask the user to set the timezone; fi
ntpd -gq
hwclock -w

and have /etc/rc.d/rc.ntpd executable by default.
I'd set the hardware clock to UTC by default.

phalange 05-23-2020 08:32 PM

Quote:

Originally Posted by Didier Spaier (Post 6126428)
In next version of the Slint installer I want to provide a mode that needs as less user interaction as possible, at the price of more post-installation configuration.

Some distributions' installers propose a timezone based on the IP geolocation and I've found a handy application to do that: https://github.com/cdown/tzupdate so I have considered including it in the installer, but that would need to ship also python and python-setuptools in it, furthermore I have no guarantee that the user's machine can have an Internet connection at time of installation.

Is there any issue delaying the timezone setting after installation? I consider suggesting users to run after installation a script that does:
Code:

tzupdate -p # prints the timezone found with IP geolocation; if found and OK then tzupdate; else ask the user to set the timezone; fi
ntpd -gq
hwclock -w

and have /etc/rc.d/rc.ntpd executable by default.
I'd set the hardware clock to UTC by default.

Yes, one might not have a connection, or be traveling with a laptop, or be using a VPN at install time. I personally prefer the installer just asks rather that guesses. Doesn't the slackware installer ask for TZ? I can't remember. But almost every installer I can think of asks either before or after completion.

I like to get the TZ correct because I want the modification dates to be accurate at the outset, but that's an old habit and maybe not important in the grand scheme of things.

jmccue 05-24-2020 06:49 AM

Quote:

Originally Posted by Didier Spaier (Post 6126428)
Is there any issue delaying the timezone setting after installation?

I doubt any issues will occur. When Slackware 7.1 came out, the installer forgot to even install the TZ package through an errant tag end file (if I remember correctly). So the fix was to manually install the TZ package and rerun the timezone select script after booting. No issues occurred other then date(1) reporting the wrong date/time. It defaulted to GMT.

I know little about PAM, but I would be surprised if PAM even care if time was out of sync.

Alien Bob 05-24-2020 07:38 AM

I think it provides a poor first experience if the user who lives in Polynesia starts her fresh installation and finds that the time is displayed in UTC.

frankbell 05-24-2020 08:05 PM

I'm inclined to agree with Alien Bob, for what it's worth.

enorbet 05-25-2020 11:35 AM

Some things one should just never do https://i.imgur.com/WvNHzRd.gif

pan64 05-25-2020 11:48 AM

it is impossible to not set TZ. I mean there is a default which will be set anyway. Probably you will not like it.

ehartman 05-25-2020 01:26 PM

Quote:

Originally Posted by pan64 (Post 6127159)
it is impossible to not set TZ. I mean there is a default which will be set anyway. Probably you will not like it.

Straight UTC or whatever the TZ is of the hardware clock.

montagdude 05-25-2020 01:41 PM

Seems to me like there is very little value in *not* asking users to set the timezone, and significant risk of annoying then to no end. Easy decision, IMO.

I.G.O.R 05-25-2020 04:30 PM

Quote:

Originally Posted by phalange (Post 6126483)
Yes, one might not have a connection, or be traveling with a laptop, or be using a VPN at install time. I personally prefer the installer just asks rather that guesses. Doesn't the slackware installer ask for TZ? I can't remember. But almost every installer I can think of asks either before or after completion.

I like to get the TZ correct because I want the modification dates to be accurate at the outset, but that's an old habit and maybe not important in the grand scheme of things.

All the installers and live CDs perform instalation in UTC, so switching time zones don't affect modification time /except Alien's BOB slack-live which boots with the US Pacific time unless you explicitly boot it with parameter tz=utc. I didn't understand why, but there is always a time shift no matter if your pc is in UTC/

Didier Spaier 05-25-2020 05:07 PM

Thanks to all who responded so far. I should have elaborated why I have considered not setting the time zone during installation in "auto" mode. Please bear with me, I will do it below.

I am targeting potential users not at ease with dialog boxes and/or the command line, including blind ones using a Braille device or a speech synthesizer (then possibly not yet acquainted with speakup's key bindings for screen review if they used another screen reader before, like Orca on the desktop or NVDA on Windows).

The timeconfig script displays a very long list (595 items) and finding its way in it is not very easy for newcomers, especially if these items are spoken, as then you can only hear one at a time. Using the page up and down keys can help, but not much if you don't know the (rather weird) layout of the list.

After installation instead we can suggest the user to run a script that will propose her a TZ based on IP geolocation when the machine is connected to internet, and only if she doesn't like it run timeconfig.

I have also considered instead (or in addition) modifying timeconfig to provide kind of an auto completion, maybe grepping the list as soon as the user presses Tab, with as argument what has been typed so far.

As an aside, doing all such configuration post installation becomes a necessity if the system is provided already installed, as mini-slint or stormux based on arch, instructions here to use it on a Pi. Oh and Storm (stormux developer) told me that some users prefer to play with it during some time before doing the configuration ;)

Have a good day,

PS and erratum: in the installer we run the clocksetup application stolen to Salix instead of timeconfig but that doesn't change the rationale as it also proposes a list of items in a dialog box.


All times are GMT -5. The time now is 08:07 PM.