LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-03-2021, 02:45 PM   #31
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,244

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322

This isn't due to a dead BIOS battery, is it?
 
Old 01-04-2021, 12:55 AM   #32
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Here's the pertinent text from man hwclock:

Code:
LOCAL vs UTC
       Keeping the Hardware Clock in a local timescale causes inconsistent daylight saving time results:

        If  Linux  is  running during a daylight saving time change, the time written to the Hardware Clock
         will be adjusted for the change.

        If Linux is NOT running during a daylight saving time change, the time read from the Hardware Clock
         will NOT be adjusted for the change.

       The Hardware Clock on an ISA compatible system keeps only a date and time, it has no concept of time-
       zone nor daylight saving. Therefore, when hwclock is told that it is in local time, it assumes it  is
       in the 'correct' local time and makes no adjustments to the time read from it.

       Linux  handles daylight saving time changes transparently only when the Hardware Clock is kept in the
       UTC timescale. Doing so is made easy for system administrators as hwclock uses  local  time  for  its
       output and as the argument to the --date option.

       POSIX  systems,  like  Linux, are designed to have the System Clock operate in the UTC timescale. The
       Hardware Clock's purpose is to initialize the System Clock, so also keeping it in UTC makes sense.

       Linux does, however, attempt to accommodate the Hardware Clock being in the local timescale. This  is
       primarily  for  dual-booting with older versions of MS Windows. From Windows 7 on, the RealTimeIsUni-
       versal registry key is supposed to be working properly so that its Hardware Clock can be kept in UTC.
I don't see any mention of UTC being better on a dual boot. What it does say is that it only takes into account DST if the system is running at the time.

So, if you are one to keep your computer turned off overnight (when DST changes happen), it would be better to keep it in UTC, as the system will auto adjust to DST when it is turned back on, or ensure time synchronization is set up (which you should have set up regardless). But if a system using localtime on the hardware clock is running (either Windows, Linux, or something else) and that system changes the DST and updates the hardware clock, any other system that is booted up afterwards will be perfectly fine and not need to make any adjustments.

That is likely why I never ran into issues with the clock not being in sync after DST... my computer was always on, either in Windows or Slackware. When whatever system was booted during DST was shutdown, that updated time was saved to the hardware clock and read in the other system as the correct time (which it was).

Yes, UTC does prevent timezone issues (assuming the timezone is set right on the OS), but keeping the hardware clock on localtime is not the doom and gloom you spell it out to be. Simply put, it is really easy to adjust Slackware to use a localtime hardware clock, but Windows requires a registry edit (not so easy). If the system is off when DST happens, but has time synchronization set up, then the problem is pretty much non-existent except for the short period of time between startup and syncing (and if that short period of time is really important because of logging, then you likely aren't dual booting or turning your system off during DST -- and for those types of systems, UTC would be better).

I'm not saying that UTC isn't preferred, but if a home user wants to keep their system on localtime to simplify things, there's nothing wrong with that. I stand by my suggestion to wirelessmc to use localtime on their system since they were having a difficult time understanding what was going on.
 
Old 01-05-2021, 05:00 PM   #33
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Original Poster
Rep: Reputation: 37
Thanks again for your valued and informative input here bassmadrighal. There is a lot of good information in this thread and it appears that even with dual-boot systems the UTC setting is the more bullet proof method. At some point I might consider switching to UTC and mucking with the Windows registry to accommodate both. For now I will stay with LOCAL setting as Windows and Slack are happily keeping the right time between boots. We'll see what happens in the Spring when we move forward an hour
 
Old 01-05-2021, 05:35 PM   #34
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
As you can see, UTC is the better method, but is a little harder to set up. Since you have time synchronization setup, you shouldn't see any issues with DST when the changes occur.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
utc-time 2 hours off dranach Debian 9 08-20-2010 07:30 PM
Linux machine gets stuck after 8 hours or 12 hours fahadaziz Linux - Newbie 4 03-28-2010 04:19 PM
time on our RH linux FTP server is four hours ahead, but desktop time is correct?? dgr Linux - Newbie 10 10-09-2007 05:42 AM
Yast Time clock OK, but Desktop is off by 6 hours Cherock Linux - Newbie 1 10-29-2006 11:14 AM
Time stamp in Samba is 11 hours behind time stamp in Linux Linh Linux - General 3 09-04-2003 12:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration