View previous topic :: View next topic |
Author |
Message |
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Wed May 15, 2002 9:23 am Post subject: Localtime vs GMT - what to choose? |
|
|
One thing I have never understood with Linux is what to choose when you get asked if the clock stores time in localtime or GMT (in rc.conf and kernel setup if I remember correctly). I have yet to see any documentation on it. I have always thought it has something to do with the CMOS clock on the motherboard, but I'm not sure. Please, can anyone enlighten me so I know the correct setting? |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Wed May 15, 2002 2:03 pm Post subject: |
|
|
Unless someone else can say otherwise, I don't think there's a good reason for the home user to not choose local.
I had a job where Sun systems were all set to GMT in different locations (states and countries). This was so everyone
was using the "same clock". I'm not sure it really matters though. I have mine set for local and haven't had any
problems. As a side note, whatever Red Hat 7.1 does for time, it never matched when I booted to MS Windows. The
times differed by 6 or so hours and I could never get them to sync (not that I tried much). |
|
Back to top |
|
|
AnimalMachine Tux's lil' helper
Joined: 27 Apr 2002 Posts: 106 Location: Milwaukee, WI USA
|
Posted: Wed May 15, 2002 2:06 pm Post subject: |
|
|
The choice is there mainly because GMT is the unix way to go ... but all those dual booters want to have their time stored local so Windows doesn't freak out.
... Or atleast that's my take on the situation. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Wed May 15, 2002 2:09 pm Post subject: |
|
|
AnimalMachine wrote: | The choice is there mainly because GMT is the unix way to go ... but all those dual booters want to have their time stored local so Windows doesn't freak out.
... Or atleast that's my take on the situation. |
Can you explain what the difference is? I'm not sure I get why I would select GMT (assuming I'm not dual-booting). Just curious. |
|
Back to top |
|
|
tomte Tux's lil' helper
Joined: 08 May 2002 Posts: 122
|
Posted: Wed May 15, 2002 7:19 pm Post subject: |
|
|
kanuslupus wrote: | AnimalMachine wrote: | The choice is there mainly because GMT is the unix way to go ... but all those dual booters want to have their time stored local so Windows doesn't freak out.
... Or atleast that's my take on the situation. |
Can you explain what the difference is? I'm not sure I get why I would select GMT (assuming I'm not dual-booting). Just curious. |
Under unix it is assumed that all times are GMT, while the output is transformed according to your timezone. that prevents (correct me if i'm wrong)
i.e. (e.g., just can't remeber ) for example "clock skew" errors after moving files from another machine while preserving their attributes. And it is helpful if you collaborate with people from different timezones.
regards,
tom |
|
Back to top |
|
|
barry Apprentice
Joined: 01 May 2002 Posts: 170 Location: UK
|
Posted: Wed May 15, 2002 7:30 pm Post subject: |
|
|
The BIOS stores the time and date information without any concept of timezone. You either set this date to your local time or to GMT (aka UTC).
If you set it to GMT, then Linux automatically will add/subtract the necessary number of hours, taking daylight saving into account. This is the cleaner way of doing things.
Windows assumes your BIOS is set to local time and will physically change the date stored in the hardware. If you dual boot with Windows, you need to set it to localtime. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Wed May 15, 2002 7:52 pm Post subject: |
|
|
Good answers... makes sense. |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Feb 04, 2003 11:31 pm Post subject: |
|
|
Another reason for people in locales that use daylight savings time to select GMT is that it prevents "clock warp", which can mess up all kinds of things, notably make. If you untar something during the daylight savings switchover hour, make may refuse to work after the switch for an hour, because it will think timestamps are in the future. In general, the system clock should not have discontinuities, IMHO. Timezone display should be an output thing, not an internal thing. I recommend "GMT". _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Tue Feb 04, 2003 11:37 pm Post subject: |
|
|
With GMT, keep in mind that MS Windows will be 1 hour off (or linux if you set MS to the correct time). I've not read of a solution to this problem other than using "local". _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
LosD n00b
Joined: 12 Jun 2002 Posts: 61 Location: Taastrup, Denmark
|
Posted: Wed Feb 05, 2003 4:47 am Post subject: |
|
|
kanuslupus wrote: | With GMT, keep in mind that MS Windows will be 1 hour off (or linux if you set MS to the correct time). I've not read of a solution to this problem other than using "local". |
And I guess that's exactly why it is there... |
|
Back to top |
|
|
chatgris Guru
Joined: 14 Oct 2002 Posts: 383 Location: Canada
|
Posted: Wed Feb 05, 2003 2:08 pm Post subject: |
|
|
kanuslupus wrote: | With GMT, keep in mind that MS Windows will be 1 hour off (or linux if you set MS to the correct time). I've not read of a solution to this problem other than using "local". |
Wouldn't it be your timezone offset number of hours off? _________________ Open your mind. Open your source.
Due credit for avatar from http://www.aikida.net |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Wed Feb 05, 2003 6:03 pm Post subject: |
|
|
Not in my experience. With the timezone set correctly, the time is off by 1 hour under MS Windows. I suppose it could be something non-intuitive. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
goanuj Tux's lil' helper
Joined: 13 Jul 2002 Posts: 125 Location: California
|
Posted: Mon Jun 23, 2003 7:15 pm Post subject: dual boot clock problem |
|
|
Hi there,
DISCLAIMER: for work reasons I need win2k on my computer.!
Basically it looks like linux is mucking around with my clock on startup and exit.
Can someone who dual boots please help me out, I have read the posts, but I think it is time for a FAQ so that one does not have to set the time every time one boots into Win2k.
Questions:
1. Please tell me what CLOCK in /etc/rc.conf should be set to, according to the FAQ it should be set to "local" but I have seen my clock get messed up quite a bit because of that.
2. should I have a /etc/adjtime file?
3. Could there be something in my init or shutdown scripts that is really messing up the clock? where would I find it? I have tried (in /etc) to
Thanks |
|
Back to top |
|
|
LosD n00b
Joined: 12 Jun 2002 Posts: 61 Location: Taastrup, Denmark
|
Posted: Mon Jun 23, 2003 7:34 pm Post subject: |
|
|
I dualboot... My CLOCK is set to "local", my /etc/localtime is symlinked to /usr/share/zoneinfo/Europe/Copenhagen... (Because I live in... Well, take a wild guess )
I haven't messed with /etc/adjtime, but it's there, maybe created from the zoneinfo file? Dunno...
I dualboot as well, no problems with screwed up clocks here... Except for daylight saving change dates, as both Windows and Gentoo wants to update it, as far as I can remember...
Hope this helps!
Dennis |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Mon Jun 23, 2003 7:47 pm Post subject: |
|
|
1. It should be set to local.
2. adjtime will be created by the hwclock command. You can remove it, and before rebooting to Gentoo, set the correct hardware clock time.
3. The clock script is in /etc/init.d/clock. |
|
Back to top |
|
|
mlsfit138 Guru
Joined: 20 Sep 2003 Posts: 406 Location: Washington
|
Posted: Wed Oct 22, 2003 2:21 am Post subject: |
|
|
I don't use windows, but is it possible to set you hardware clock to gmt, and inform windows that you are using that setting, and have windows automatically its own clock w/o messing w/ the bios clock? it seems that would solve the problem, and i think it would pretty lame if windows didn't have a feature like that. any windows gurus? |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Sat Nov 08, 2003 1:23 am Post subject: |
|
|
mlsfit138 wrote: | any windows gurus? |
wrong forum... |
|
Back to top |
|
|
Kesereti Guru
Joined: 07 Nov 2002 Posts: 520
|
Posted: Sat Nov 08, 2003 2:32 am Post subject: |
|
|
mlsfit138 wrote: | I don't use windows, but is it possible to set you hardware clock to gmt, and inform windows that you are using that setting, and have windows automatically its own clock w/o messing w/ the bios clock? it seems that would solve the problem, and i think it would pretty lame if windows didn't have a feature like that. any windows gurus? |
...you mean you expect Windows to assume it's not the only thing that could ever want to access the BIOS clock, and act accordingly? Or use standards not developed by them? Bah, what sillyness ^_^ |
|
Back to top |
|
|
Thunderer n00b
Joined: 03 Oct 2004 Posts: 4
|
Posted: Mon Nov 08, 2004 1:04 am Post subject: |
|
|
I really don't know what to make of this. Experienced the "clock skew" error for the first time and it was also the first time (that I remember) I set the clock to "local" in rc.conf.
Now that I booted to WinXP the clock was 2 hours late.
I've installed Gentoo quite a few times and never had such problems with using UTC in rc.conf and /Europe/Helsinki in the zoneinfo.
Any help on how to recover from the clock skew error? |
|
Back to top |
|
|
bulash n00b
Joined: 14 Apr 2004 Posts: 63
|
Posted: Mon Nov 15, 2004 2:10 am Post subject: |
|
|
Hm, an old thread, but since it is linked from the faq...
You CAN actually make windows use UTC! See here for reference.
In order to get it working look for Code: | TimeZoneInformation | in the windows registry (btw: I use xp pro).
There, create a new key and set it to 1:
Code: | \HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation\RealTimeIsUniversal=1 |
Switch of everything that adjusts the time from within windows and reboot .
Et voila, your windows now uses UTC!
HOWEVER, this is not a supported feature of windows! I was just playing around with it and switched back to localtime, as I don't now whether it is really a good idea to do this. It is up to you, just don't blame me if your windows becomes unstable... |
|
Back to top |
|
|
bjlockie Veteran
Joined: 18 Oct 2002 Posts: 1186 Location: Canada
|
Posted: Wed Sep 28, 2011 3:31 pm Post subject: |
|
|
AnimalMachine wrote: | The choice is there mainly because GMT is the unix way to go ... but all those dual booters want to have their time stored local so Windows doesn't freak out.
... Or atleast that's my take on the situation. |
All my clocks are local time so how am I supposed to set the BIOS clock to UTC time?
My ntp broke because wicd doesn't bring up the network first. _________________ AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Wed Sep 28, 2011 4:32 pm Post subject: |
|
|
or just set time to local, bios to your localtime so windows will always keep the good time
and set your time under linux with ntp and disallow any hardware time settings (no clock->linux or linux->clock in rc.conf)
you'll end with always on time linux and more/less (as good as your bios could) windows time |
|
Back to top |
|
|
mp342 Apprentice
Joined: 03 Aug 2010 Posts: 165 Location: France
|
Posted: Wed Sep 28, 2011 7:55 pm Post subject: |
|
|
According to the previous link, windows now can handle UTC (M$ needs 4 years !). |
|
Back to top |
|
|
|