Sincronizzare orario dual-boot UTC


UTC in Windows

Warning: This method uses functionality that is buggy in old Windows versions (pre-7) and Microsoft recommends not to use it. See [1] for details. Another bug exists on Windows before Vista SP2 that resets the clock to localtime after resuming from the suspend/hibernation state. For even older versions of Windows, you might want to read – the functionality was not even documented nor officially supported then. For these operating systems, it is recommended to use localtime. If you are using newer versions of Windows, you may safely disregard this warning.

One reason users often set the RTC in localtime is to dual-boot with Windows (which uses localtime). However, Windows is able to deal with the RTC being in UTC with a simple registry fix. It is recommended to configure Windows to use UTC, rather than Linux to use localtime. If you make Windows use UTC, also remember to disable the “Internet Time Update” Windows feature, so that Windows does not mess with the hardware clock, trying to sync it with internet time. You should instead use an agent for the NTP to modify the RTC and sync to internet time, see #Time synchronization.

Using regedit, add a DWORD value with hexadecimal value 1 to the registry:


Alternatively, create a *.reg file (on the desktop) with the following content and double-click it to import it into registry:

Windows Registry Editor Version 5.00


If the above appears to have no affect, and a 64-bit variant of Windows is being used, using a QWORD value instead of a DWORD value may resolve the issue.

Should Windows ask to update the clock due to DST changes, let it. It will leave the clock in UTC as expected, only correcting the displayed time.

The hardware clock and system clock time may need to be updated after setting this value.

If you are having issues with the offset of the time, try reinstalling tzdata and then setting your time zone again:

# timedatectl set-timezone America/Los_Angeles

It makes sense to disable time synchronization in Windows – otherwise it will mess up the hardware clock.

UTC in Ubuntu

Ubuntu and its derivatives have the hardware clock set to be interpreted as in “localtime” if Windows was detected on any disk during Ubuntu installation. This is apparently done deliberately to allow new Linux users to try out Ubuntu on their Windows computers without editing the registry.

To change this behaviour in Ubuntu you need to do the following. Open the file:


and change UTC flag to UTC=yes.

Time zone

To check the current zone defined for the system:

$ timedatectl

To list available zones:

$ timedatectl list-timezones

To change your time zone:

# timedatectl set-timezone Zone/SubZone


# timedatectl set-timezone Canada/Eastern

This will create an /etc/localtime symlink that points to a zoneinfo file under /usr/share/zoneinfo/. In case you choose to create the link manually, keep in mind that it must be a symbolic link, not hard, as specified in archlinux(7).

See man 1 timedatectl, man 5 localtime, and man 7 archlinux for more details.

Note: If the pre-systemd configuration file /etc/timezone still exists in your system, you can remove it safely, since it is no longer used.


Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:


Stai commentando usando il tuo account Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

%d blogger hanno fatto clic su Mi Piace per questo: