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

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

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

Postby kytx on Sun Jun 17, 2012 5:11 am

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 kytx on Sun Jun 17, 2012 6:11 pm, edited 1 time in total.
kytx
Level 1
Level 1
 
Posts: 4
Joined: Sun Jun 17, 2012 4:46 am

Linux Mint is funded by ads and donations.
 

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

Postby grizzler on Sun Jun 17, 2012 8:27 am

Check the file /etc/default/rcS and make sure there's a line with UTC=yes in it.
grizzler
Level 4
Level 4
 
Posts: 422
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

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

Postby kytx on Sun Jun 17, 2012 6:07 pm

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]....
kytx
Level 1
Level 1
 
Posts: 4
Joined: Sun Jun 17, 2012 4:46 am


Return to Newbie Questions

Who is online

Users browsing this forum: yatesco and 17 guests