FS#12933 - tzselect in set_clock() ignores "local time" option
Attached to Project:
Release Engineering
Opened by Evangelos Foutras (foutrelis) - Saturday, 24 January 2009, 17:18 GMT
Last edited by Dieter Plaetinck (Dieter_be) - Monday, 30 March 2009, 20:02 GMT
Opened by Evangelos Foutras (foutrelis) - Saturday, 24 January 2009, 17:18 GMT
Last edited by Dieter Plaetinck (Dieter_be) - Monday, 30 March 2009, 20:02 GMT
|
Details
Even though HARDWARECLOCK is set to "local", tzselect
assumes current time is in UTC.
I've attached a screen capture from archlinux-2009.01-ftp-x86_64.iso (alhpa) running in vmware. When asked, I answered that the hardware clock is in local time. However, when I'm asked to confirm the time values presented to me, both local and universal time should be minus 2 hours. Were I to select "Yes", it would probably set the correct timezone/time, but it's quite confusing when you are prompted to confirm wrong values. |
This task depends upon
Closed by Dieter Plaetinck (Dieter_be)
Monday, 30 March 2009, 20:02 GMT
Reason for closing: Fixed
Additional comments about closing: got rid of tzselect. see FS#13196
for all date/time refactoring
Monday, 30 March 2009, 20:02 GMT
Reason for closing: Fixed
Additional comments about closing: got rid of tzselect. see
I'll upload a video to illustrate my issue better. :)
FS#12941for my experience in a normal installation.FS#12917. Installation worked flawlessly after using a local copy of x86_64 [core].The only place it's displayed incorrectly is at tzselect's confirmation step. I can't see a way to fix this, maybe we should go back to dialog based timezone selection?
I agree this should be fixed but I don't consider it a showstopper for 2009.01
I'll look at it before the next release.
There one sets the timezone first, and then the date stuff, so this will probably fix this issue too. stay tuned.
We should avoid each tool which changes the time during any selection - until we wan't to change it. tzselect for ex. changes the time when selecting a timezone (this is bad cause the hwclock and system time is mostly correct after a boot). Same when copying timezone files to /etc/localtime. But when one only set and export TZ with his timezone then the system time is kept and only displayed with correct timezone value.
2009.02 time/date setting (in installer) is IMHO better than 2008.06 (tzselect, "hardcoded" timezone was CDT IMHO), but not optimal. In 2009.02 timezone was UTC after boot which is IMHO optimal for all installations.
What times have we after booting the live/install ISO?
1) hwclock
a) BIOS datetime is correct and set to localtime, or
b) BIOS datetime is correct and set to UTC, or
c) BIOS datetime is not correct
2) system time (this is interpreted with the timezone, first with UTC)
a) date shows false time when 1.a is given (localtime vs. UTC). Could be corrected when setting/exporting TZ with correct value, but we should avoid using tzselect or copy a timezone to /etc/localtime cause this *changes* the time value! but we need only a different interpretation)
b) date shows correct time when 1.b is given (hwlock UTC vs. date with UTC). When a user would change UTC to his local timezone then also the system time value (not the hwclock) must be changed. Here this is could be done ex. with tzselect tool or copying timezone file to /etc/localtime, but better do this in a own step.
c) date shows false time when 1.c is given (all clocks wrong). For this (and as a fallback) we should have a step where a user should be able to set the timezone and value by hand/dialog, with this values we modify system time(date) and BIOS clock(hwclock).
So what's our steps for timesetting?
Ideally we never would have any problem when users would set HWCLOCK and TIMEZONE in bootloader as boot parameters ;-)
But if a user boot boot the cd without these in Peking, Chicago or Brussel we must ask him some questions:
a) Is your hardware clock set to localtime or UTC?
b) Based on this answer whe should present the output of date or date -u
c) Ask him: Is this the correct time displayed also on your watch? (timezone is nor relevant this step!)
Based on his answer time value must probably set by hand/dialog and corrected with date -s "value".
d) Next question is: Where do you live, what's your timezone?
Based on the answer we should set/export TZ and display the time again with date
e) Assumed that last step shows the correct local time for the user (datetime value AND timezone) we should ask: Do you want keep your hardwareclock(BIOS) in localtime or UTC?
What we have this moment? A correct system time based on users selections. We have also TIMEZONE var and HARDWARECLOCK for the generated rc.conf later. As a last step we now should set the hwclock/BIOS according to the system time (either as localtime or UTC, based on HARDWARECLOCK).
During system config we must also copy the according timezone file to /mnt/etc/localtime early (before any chroot'ing), but we should NOT do this in the live cd system!
IMHO this could be the way we should handle time setting things during installer/aif.
See http://www.archlinux.org/pipermail/arch-releng/2009-February/000415.html
FS#13196We don't even use tzselect anymore now.