Announcement

Collapse
No announcement yet.

Time :: UTC vs Local

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Time :: UTC vs Local

    Anyone who lives in a country that observes daylight saving and dual boots their Kubuntu with Windows knows how much of a pain it is to get both OSes to show the same time in their clocks, as one defaults to the hardware clock (BIOS/UEFI) being UTC based, and one being Localtime based.

    You used to fix (read: intentionally break(*)) this in Kubuntu by adding UTC=no in /etc/defailt/rcS.

    However, `man rcS` tells us:

    Code:
    NOTE
           The EDITMOTD, RAMRUN and UTC variables are no longer used.  The UTC setting is
           replaced by the UTC or LOCAL setting in /etc/adjtime,  and  should  have  been
           migrated  automatically.  See hwclock(5) and hwclock(8) for further details on
           configuring the system clock.
    So now make sure your time is correct (whose idea was it to not include ntp/ntpdate in the OS by default anyway?) and use the following command to set the hardware clock to the (intentionally wrong(*)) time and know that you're using Localtime:

    Code:
    sudo hwclock --systohc --localtime
    And that ought to do it.

    (*) It's a hardware clock, people. You should never change its setting to local. That's what software is for. But Windows is broken and even if you set the registry to use UTC it won't do it.
    --
    Intocabile

    #2
    Originally posted by Spadge View Post
    whose idea was it to not include ntp/ntpdate in the OS by default anyway?
    I think those are not included (ntp never was installed by default) because time synchronization should be handled by systemd:

    Maybe there is a problem with that on your machine:
    1. is systemd-timesyncd running/enabled on your machine
    Code:
    systemctl status systemd-timesyncd
    2. What is the status of network time/ntp and RTC:
    Code:
    timedatectl status
    3. Valid NTP-servers in:
    Code:
    cat /etc/systemd/timesyncd.conf
    Last edited by kubicle; Apr 02, 2016, 10:57 PM.

    Comment


      #3
      It's not the setting of the time that's the problem. TBH that bit was probably running just fine in the background quietly.
      --
      Intocabile

      Comment


        #4
        Originally posted by Spadge View Post
        It's not the setting of the time that's the problem. TBH that bit was probably running just fine in the background quietly.
        My mistake, I thought your comment implied that one needs ntp/ntpdate to synchronize time over ntp.

        Comment

        Working...
        X