Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How the kernel dectect if hardware clock is in UTC or LOCAL?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1368
Location: Montréal

PostPosted: Mon Jun 15, 2015 11:05 pm    Post subject: How the kernel dectect if hardware clock is in UTC or LOCAL? Reply with quote

According to this link System time - Gentoo Wiki we should use the kernel capability instead of hwclock boot/shutdown script to set the system time from the hardware time and the hardware time from system time. Reading the configuration options helps the kernel will write the hardware clock from system clock at every 11 minutes if the system clock have been updated from network time using NTP protocol.

How the kernel know if the hardware clock is in UTC or LOCAL and read and write it accordingly?

How do it know if the system clock have been updated since boot using NTP protocol?
_________________
Paul
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7130
Location: almost Mile High in the USA

PostPosted: Tue Jun 16, 2015 12:50 am    Post subject: Reply with quote

The default MC146818 chip doesn't have a well defined way of determining it's in UTC or local time, the assumption is local if Windows is also installed. So the software has to be written to keep this in mind.

On my pure Linux boxes I keep it in UTC. The dual booters are local time, but I think there is a way to set recent versions of Windows to use UTC as well.

Other newer clock chips may have this flag, but not the classic.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2613

PostPosted: Tue Jun 16, 2015 6:01 am    Post subject: Re: How the kernel dectect if hardware clock is in UTC or LO Reply with quote

Logicien wrote:
How the kernel know if the hardware clock is in UTC or LOCAL and read and write it accordingly?

How do it know if the system clock have been updated since boot using NTP protocol?
See http://tldp.org/HOWTO/Clock-2.html#ss2.3
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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