time synchronization issue

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
yadavml
Level 1
Level 1
Posts: 8
Joined: Mon Apr 20, 2015 7:54 am

time synchronization issue

Post by yadavml » Mon Sep 05, 2016 2:09 am

Hi.. i have install and configure Linux mint and windows 10 with dual boot. I have issue in date and time synchronization. When i switch from mint to my Windows 10, showing difference in date and time, need manually set time and date.

How can i fix it.

Thanks in advance.

User avatar
jimallyn
Level 17
Level 17
Posts: 7897
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: time synchronization issue

Post by jimallyn » Mon Sep 05, 2016 3:20 am

I think that happens when you have either Windows or the UEFI/BIOS set to Universal Time, and Linux set to local time. Or vice versa.
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

grizzler
Level 5
Level 5
Posts: 658
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

Re: time synchronization issue

Post by grizzler » Mon Sep 05, 2016 7:04 am

Considering microsoft has always been too stupid to make its junk use UTC by default, it's probably vice versa. :lol:

The solution is to either switch Windows to UTC or Linux to local time. The former is a pain because network time synchronisation will either fail or keep resetting things. The latter is relatively easy with the timedatectl command. Try this in a terminal window:

Code: Select all

timedatectl set-local-rtc 1
You may have to change the actual setting of the clocks once more, but after that, they should be in sync and switching from one to the other shouldn't affect the clock anymore.

JChristensen
Level 2
Level 2
Posts: 65
Joined: Sat Apr 25, 2015 8:52 pm

Re: time synchronization issue

Post by JChristensen » Mon Sep 05, 2016 11:16 am

As noted, Windows sets the hardware clock (RTC) to local time by default. This is what we would expect from Windows, since setting it to UTC makes much more sense. In Windows 8.1, the default can be changed by adding the registry key below. This has worked well for me. I don't have Windows 10 so YMMV but it could work the same.

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
LM18.3 C64 on Dell Optiplex 745, HP Pavilion dv6, dv7; LM18 C64 on HP h8.

grizzler
Level 5
Level 5
Posts: 658
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

Re: time synchronization issue

Post by grizzler » Mon Sep 05, 2016 1:46 pm

That's the alternative, yes. By the way, Windows 10 64-bit appears to use a qword rather than a dword.

Also, make sure Windows' internet time synchronisation is switched off.

And of course there are reports this doesn't always work on W10 Home Editions: http://superuser.com/questions/975717/d ... -bios-time

JChristensen
Level 2
Level 2
Posts: 65
Joined: Sat Apr 25, 2015 8:52 pm

Re: time synchronization issue

Post by JChristensen » Mon Sep 05, 2016 7:20 pm

I had left Internet time sync on and all seems well.
LM18.3 C64 on Dell Optiplex 745, HP Pavilion dv6, dv7; LM18 C64 on HP h8.

ladyonthemoon
Level 1
Level 1
Posts: 29
Joined: Wed Sep 07, 2016 12:30 pm
Location: Paris, France

Re: time synchronization issue

Post by ladyonthemoon » Wed Sep 07, 2016 1:17 pm

grizzler wrote:... Try this in a terminal window:

Code: Select all

timedatectl set-local-rtc 1
You may have to change the actual setting of the clocks once more, but after that, they should be in sync and switching from one to the other shouldn't affect the clock anymore.
Hi,

I have this problem too. I just used the command; I'll see if it worked when I reboot Windows 7.

Thank you for the tip!

yadavml
Level 1
Level 1
Posts: 8
Joined: Mon Apr 20, 2015 7:54 am

Re: time synchronization issue

Post by yadavml » Thu Sep 08, 2016 7:39 am

Waoo.. Its working.. Thanks for your comments guys... :-)

ladyonthemoon
Level 1
Level 1
Posts: 29
Joined: Wed Sep 07, 2016 12:30 pm
Location: Paris, France

Re: time synchronization issue

Post by ladyonthemoon » Thu Sep 08, 2016 8:00 am

ladyonthemoon wrote:
grizzler wrote:... Try this in a terminal window:

Code: Select all

timedatectl set-local-rtc 1
You may have to change the actual setting of the clocks once more, but after that, they should be in sync and switching from one to the other shouldn't affect the clock anymore.
Hi, I have this problem too. I just used the command; I'll see if it worked when I reboot Windows 7. Thank you for the tip!
I can confirm that it's working. Thanks! :)

JChristensen
Level 2
Level 2
Posts: 65
Joined: Sat Apr 25, 2015 8:52 pm

Re: time synchronization issue

Post by JChristensen » Thu Sep 08, 2016 9:12 am

From man timedatectl. Note caveats.

Code: Select all

       set-local-rtc [BOOL]
           Takes a boolean argument. If "0", the system is configured to
           maintain the RTC in universal time. If "1", it will maintain the
           RTC in local time instead. Note that maintaining the RTC in the
           local timezone is not fully supported and will create various
           problems with time zone changes and daylight saving adjustments. If
           at all possible, keep the RTC in UTC mode. Note that invoking this
           will also synchronize the RTC from the system clock, unless
           --adjust-system-clock is passed (see above). This command will
           change the 3rd line of /etc/adjtime, as documented in hwclock(8).
LM18.3 C64 on Dell Optiplex 745, HP Pavilion dv6, dv7; LM18 C64 on HP h8.

Post Reply

Return to “Installation & Boot”