LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-06-2013, 04:51 AM   #1
DeeGee
Member
 
Registered: Apr 2013
Distribution: Debian, Linux From Scratch, Mint
Posts: 118

Rep: Reputation: 24
hwclock configuration issue


I'm running Debian on virtualbox and when I run hwclock something weird occurs.

Code:
root:/# hwclock --show
Mon May  6 14:06:19 2013  -0.682111 seconds
This is correct and gives the correct local time.

But when I run hwclock --localtime this comes up:

Code:
root:/# hwclock --localtime --show
Mon May  6 08:39:27 2013  -0.584475 seconds
This is actually UTC!

Is my understanding wrong or is there an error in my hwclock configuration?
 
Old 05-06-2013, 07:22 PM   #2
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Rep: Reputation: Disabled
Same result for me with RHEL 6.4:

Code:
[root@srv69 ~]# hwclock --show
Tue 07 May 2013 09:16:51 AM EST  -0.813245 seconds

[root@srv69 ~]# hwclock --utc --show
Tue 07 May 2013 09:16:54 AM EST  -0.828727 seconds

[root@srv69 ~]# hwclock --localtime --show
Mon 06 May 2013 11:16:59 PM EST  -0.094327 seconds

man hwclock, explains a little better:

--localtime :Indicates that the Hardware Clock is kept in Coordinated Universal Time or local time, respectively.
It is your choice whether to keep your clock in UTC or localtime, but nothing in the clock tells which youâve chosen. So this option is how you give that information to hwclock.

If you specify the wrong one of these options (or specify neither and take a wrong default), both setting and querying of the Hardware Clock will be messed up.

If you specify neither --utc nor --localtime , the default is whichever was specified the last time hwclock was used to set the clock (i.e. hwclock was successfully
run with the --set, --systohc, or --adjust options), as recorded in the adjtime file. If the adjtime file doesnât exist, the default is local time.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with hwclock suraj.mandhare Linux - Kernel 0 11-01-2012 07:26 AM
[SOLVED] hwclock mreff555 Linux - Hardware 4 09-26-2012 10:59 PM
#$%@! hwclock and everyone in it mk27 Linux - General 7 03-19-2009 12:52 AM
hwclock alaios Linux - General 1 11-02-2004 09:40 AM
hwclock - HTS Linux - Software 4 10-28-2004 03:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration