Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Localtime vs GMT - what to choose?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
kerframil
l33t
l33t


Joined: 19 Apr 2002
Posts: 710
Location: London, UK

PostPosted: Wed May 15, 2002 9:23 am    Post subject: Localtime vs GMT - what to choose? Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16102
Location: Colorado

PostPosted: Wed May 15, 2002 2:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
AnimalMachine
Tux's lil' helper
Tux's lil' helper


Joined: 27 Apr 2002
Posts: 106
Location: Milwaukee, WI USA

PostPosted: Wed May 15, 2002 2:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16102
Location: Colorado

PostPosted: Wed May 15, 2002 2:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
tomte
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2002
Posts: 122

PostPosted: Wed May 15, 2002 7:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
barry
Apprentice
Apprentice


Joined: 01 May 2002
Posts: 170
Location: UK

PostPosted: Wed May 15, 2002 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16102
Location: Colorado

PostPosted: Wed May 15, 2002 7:52 pm    Post subject: Reply with quote

Good answers... makes sense.
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Tue Feb 04, 2003 11:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16102
Location: Colorado

PostPosted: Tue Feb 04, 2003 11:37 pm    Post subject: Reply with quote

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".
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
LosD
n00b
n00b


Joined: 12 Jun 2002
Posts: 61
Location: Taastrup, Denmark

PostPosted: Wed Feb 05, 2003 4:47 am    Post subject: Reply with quote

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... :P :)
Back to top
View user's profile Send private message
chatgris
Guru
Guru


Joined: 14 Oct 2002
Posts: 383
Location: Canada

PostPosted: Wed Feb 05, 2003 2:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16102
Location: Colorado

PostPosted: Wed Feb 05, 2003 6:03 pm    Post subject: Reply with quote

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.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
goanuj
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2002
Posts: 125
Location: California

PostPosted: Mon Jun 23, 2003 7:15 pm    Post subject: dual boot clock problem Reply with quote

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
Code:
grep hwclock *


Thanks
Back to top
View user's profile Send private message
LosD
n00b
n00b


Joined: 12 Jun 2002
Posts: 61
Location: Taastrup, Denmark

PostPosted: Mon Jun 23, 2003 7:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Mon Jun 23, 2003 7:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
mlsfit138
Guru
Guru


Joined: 20 Sep 2003
Posts: 406
Location: Washington

PostPosted: Wed Oct 22, 2003 2:21 am    Post subject: Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2732
Location: Bay Area, CA

PostPosted: Sat Nov 08, 2003 1:23 am    Post subject: Reply with quote

mlsfit138 wrote:
any windows gurus?


wrong forum... :)
Back to top
View user's profile Send private message
Kesereti
Guru
Guru


Joined: 07 Nov 2002
Posts: 520

PostPosted: Sat Nov 08, 2003 2:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Thunderer
n00b
n00b


Joined: 03 Oct 2004
Posts: 4

PostPosted: Mon Nov 08, 2004 1:04 am    Post subject: Reply with quote

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
View user's profile Send private message
bulash
n00b
n00b


Joined: 14 Apr 2004
Posts: 63

PostPosted: Mon Nov 15, 2004 2:10 am    Post subject: Reply with quote

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 :wink:.

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... :D
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1182
Location: Canada

PostPosted: Wed Sep 28, 2011 3:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4152

PostPosted: Wed Sep 28, 2011 4:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
mp342
Apprentice
Apprentice


Joined: 03 Aug 2010
Posts: 165
Location: France

PostPosted: Wed Sep 28, 2011 7:55 pm    Post subject: Reply with quote

According to the previous link, windows now can handle UTC (M$ needs 4 years !).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum