Results 1 to 5 of 5

Thread: Ubuntu 16.04 reverts to UTC time on reboot

  1. #1
    Join Date
    Oct 2006
    Location
    Olympia WA USA
    Beans
    94
    Distro
    Ubuntu 16.04 Xenial Xerus

    Ubuntu 16.04 reverts to UTC time on reboot

    Either my 16.04 reverts to UTC time on reboot, or my attempts to set it to RTC time fail. I don’t know which.

    I’m trying to fix the classic problem on my dual boot computer where Windows 7 gets it’s clock messed up after switching from Ubuntu to Windows 7.

    I used to be able to fix this problem with the “timedatectl set-local-rtc 1 --adjust-system-clock” command. But that no longer works. Something has changed.

    When I try it, I get a response: “Failed to set local RTC: Access denied.” -- even when using sudo and entering my password.

    Yet when I check it using the “timedatectl” command, I see: “RTC in local TZ: yes” - whereas before I gave the command to change it, it said “no”. So it says “access denied” yet tells me it made the change anyway, which is inconsistent.

    But after rebooting, “RTC in local TZ: no” has returned.

    I suspect it did change to RTC time, but only for the current session. And that changing it for all future sessions requires some extra steps involving becoming a super-duper-king-of-all-asministrators security clearance user.

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Ubuntu 16.04 reverts to UTC time on reboot

    Unix systems want to use UTC internally and display whatever TZ you request based on the TZ environment variable.
    There's a way to get Windows to use UTC, but I don't know how. That's the easiest, long-term, fix.
    How to set the TZ is in the Ubuntu Server Guide or Ubuntu Desktop Guide. Both are easily found with a web search based on the release being used.

    My ~/.bashrc has this line:
    Code:
    export TZ='America/New_York'
    Make that match whatever you need.
    https://help.ubuntu.com/ Has links to both the server and desktop guide for current, supported, releases.

    https://www.howtogeek.com/323390/how...-dual-booting/ has a few options, including how to get Windows to use UTC.

    I've had issues with Windows keeping correct time since 1994. My solution won't help you. Sorry.

  3. #3
    Join Date
    Oct 2006
    Location
    Olympia WA USA
    Beans
    94
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Ubuntu 16.04 reverts to UTC time on reboot

    Bump. This problem is not yet solved.

    Anyone else know what to do?

  4. #4
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Ubuntu 16.04 reverts to UTC time on reboot

    You did not say if you used this:
    EDIT: I just read your first post, Ah I see now, you may still be using NTP and that will need to be disabled:
    Code:
    sudo update-rc.d -f ntp remove
    now set it :
    Code:
    sysctl start systemd-timesyncd.service
    Code:
    timedatectl set-local-rtc 1
    To check:
    Code:
    timedatectl | grep local
    Last edited by 1fallen; October 5th, 2019 at 09:17 PM.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  5. #5
    Join Date
    Jun 2007
    Beans
    14,793

    Re: Ubuntu 16.04 reverts to UTC time on reboot

    It's better to make Windows use UTC time: https://wiki.archlinux.org/index.php...UTC_in_Windows

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •