[SOLVED] Problems setting hardwre clock to UTC Mint 13 MATE

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
kytx

[SOLVED] Problems setting hardwre clock to UTC Mint 13 MATE

Post by kytx »

Hi all! I'm dual-booting Mint13 and Windows7. Hardware clock (which is time in BIOS if I understand it right) set to UTC. I live in Auckland, New Zealand, my time zone is UTC+12.

Now that I have Windows to recognize that hardware clock is set to UTC and add 12 hours to show me correct local time (there is a registry tweak) I want to do same for my Linux.

I set my georgaphic location during installation. But the problem is it seems not adding 12 hours to show the right local time. What it shows to me is actually time set in BIOS (which is UTC until I try to change software clock). When I try to change software clock it will change my time in BIOS. Syncing with an NTP server also changes BIOS time. I used the following tutorial to fix this issue in OpenSUSE 12.1 on another machine, worked like charm, but won't work for Mint: http://www.linuxsa.org.au/tips/time.html

Also I can't have hwclock show me BIOS time even with hwclock --utc or hwclock --show --utc (actually not sure which one is supposed to do it, but tried both - shows only NZST)


UPDATE#1: tried this while offline to help identify the problem:
#echo local time is 22:58
local time is 22:58
# echo BIOS time is 10:58
BIOS time is 10:58
# date
Thu Jun 17 10:58:05 NZST 2038
# date --utc
Wed Jun 16 22:58:10 UTC 2038
# hwclock
Thu 17 Jun 2038 22:58:16 NZST -0.828982 seconds
# hwclock --utc
Thu 17 Jun 2038 22:58:23 NZST -0.676807 seconds

Looks like OS treats time in BIOS as local time, but I don't get then the meaning of hwclock output. How do I make it treat BIOS time as UTC? hwclock --systohc and --hcto sys seem actually doing same thing - changing BIOS time from correct UTC to UTC+12.

UPDATE#2 hwclock and date appear to work somewhat independently:
# hwclock --set --date="2012-06-17 23:15:15"
# date --utc
Sat Jun 16 23:16:25 UTC 2012
# date
Sun Jun 17 11:16:30 NZST 2012
# hwclock --set --date="2012-06-17 11:15:15"
# date --utc
Sat Jun 16 23:17:51 UTC 2012
# date
Sun Jun 17 11:17:57 NZST 2012

All this makes me frustrated. I've got completely lost in this stuff.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
grizzler

Re: Problems with setting hardwre clock to utc. Mint 13 MATE

Post by grizzler »

Check the file /etc/default/rcS and make sure there's a line with UTC=yes in it.
kytx

Re: Problems with setting hardwre clock to utc. Mint 13 MATE

Post by kytx »

Yep, that worked. I was sure there is such a setting in conf files, but wasn't sure where to look for. Many thanx. This is pretty weird they did not include an option to keep time in UTC in installer.

Now I just need to figure out how to mark my question [SOLVED]....
Locked

Return to “Beginner Questions”