How to Prevent Ubuntu from Setting BIOS Clock to UTC
I have a dual-boot computer that boots Ubuntu and Windows 7. Whenever I boot into Ubuntu, the BIOS clock is automatically set to UTC time, even though my current timezone is UTC+8.
Microsoft Windows on other hand, assumes that the BIOS clock contains the local time. I am not sure if there’s a way to make Windows assume that the BIOS time is set to UTC, but I have found a way to stop Ubuntu from setting the BIOS clock to UTC.
Ubuntu has a variable settings file called rcS in the /etc/default directory. This file contains variables that affect the behaviour of startup scripts. One of the variables is the ‘UTC’ paramater. This parameter is used to govern how the BIOS or hardware clock is intepreted. If it’s set to ‘no’ then the system clock is assumed to be set to local time. If it’s set to ‘yes’ then it’s assumed to be set to UTC time.
To let Ubuntu interpret the system clock as local time, the ‘UTC’ parameter has to be set to ‘no’. To update the parameter in the file, run the following command in a terminal.
ibrahim@anfield:~$ sudo bash [sudo] password for ibrahim: root@trafford:~# sed 's/UTC=yes/UTC=no/' /etc/default/rcS > /tmp/rcS root@trafford:~# mv -f /tmp/rcS /etc/default/rcS
To update the BIOS time to localtime, run hwclock as follows:
root@trafford:~# hwclock --systohc --localtime
Latest posts by Mohamed Ibrahim (see all)
- Get Route Details for a Destination on Linux - March 9, 2014
- How to View Facebook Private Album Photos - March 2, 2014
- Keeping Warranty Intact for Sony Xperia Unlocked Phones - February 23, 2014
- How to Decrypt WhatsApp Database Messages - February 16, 2014
- Android MMC mmcblk Partition Layout - February 9, 2014