Results 1 to 2 of 2

Thread: How do I switch my hardware clock from localtime to UTC

  1. #1
    Join Date
    Oct 2008
    Beans
    3

    How do I switch my hardware clock from localtime to UTC

    I originally set my Xubuntu 12.04 install to store localtime to the hardware clock, because I thought that would require the minimum amount of hassle for dual-booting with Windows.

    But after I read that it was easy to switch Windows to handle a UTC system clock here: https://wiki.archlinux.org/index.php...UTC_in_Windows

    and read about the impact of a localtime system clock on Linux here: http://tldp.org/HOWTO/Clock-2.html

    I decided to switch my computer's hardware clock (RTC) to UTC. Unfortunately, although I know I selected that option when installing Xubuntu, I didn't find any mention of how to make this change here: https://help.ubuntu.com/community/UbuntuTime

    Eventually I figured out, the change that needed to be made was:

    1) Confirm the correct timezone is set using dpkg-reconfigure tzdata
    2) Set the correct time using System=>Time and Date
    3) Push this time/date to the hardware clock (RTC) using hwclock --utc --systohc
    4) Edit /etc/default/rcS and change utc=NO to utc=YES

    I'm not pretending to have this all figured out, but thought I'd try to share my learnings with anyone else who was unable to figure out that /etc/default/rcS was useful in whether UTC or localtime was used with the hardware/RTC clock.

  2. #2
    Join Date
    Jul 2007
    Location
    Tāmaki Makau-rau, NZ
    Beans
    6,909
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: How do I switch my hardware clock from localtime to UTC

    If you already have Windows installed and then install Ubuntu, it assumes that Windows is using local time (which most people do, after all) and sets "UTC=no" in /etc/default/rcS

    I ran into this problem last year when I was doing a lot of test installations and eventually discovered it was supposed to do that.
    https://bugs.launchpad.net/ubuntu/+s...up/+bug/946132

    Just something to keep in mind. If you know about it, you can then fix it manually. If not, it can drive you silly.

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
  •