LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-13-2005, 01:50 PM   #1
Peter Aleksic
LQ Newbie
 
Registered: Nov 2004
Location: Belgrade, Serbia
Distribution: CentOS, Debian, FreeBSD
Posts: 10

Rep: Reputation: 0
hwclock weirdness


Can someone explain this hwclock behavior. My system clock is UTC+1 and hardware clock in UTC. Setting my date and than using hwclock --systohc --utc, in order to have my RTC in UTC, reveals confusing results in hwclock.

Code:
paleksic ~ # date
Tue Dec 13 20:15:50 CET 2005

paleksic ~ # date --utc
Tue Dec 13 19:16:23 UTC 2005

paleksic ~ # hwclock --utc
Tue 13 Dec 2005 08:16:46 PM CET  -0.793399 seconds

paleksic ~ # hwclock --localtime
Tue 13 Dec 2005 07:17:19 PM CET  -0.572439 seconds

paleksic ~ # ls -l /etc/localtime·
lrwxrwxrwx  1 root root 35 Nov 13 12:09 /etc/localtime -> /usr/share/zoneinfo/Europe/Belgrade

paleksic ~ # hwclock --systohc --utc

paleksic ~ # hwclock --utc
Tue 13 Dec 2005 08:19:26 PM CET  -0.610352 seconds

paleksic ~ # hwclock --localtime
Tue 13 Dec 2005 07:19:39 PM CET  -0.803869 seconds
Why is it printing my local time with hwclock --utc and my system time with hwclock --localtime. Is this behavior OK for hwclock. IMHO it would be more logical to print results vice versa like in date command?

Code:
paleksic ~ # hwclock --debug
hwclock from util-linux-2.12r
hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
Using direct I/O instructions to ISA clock.
Last drift adjustment done at 1134501607 seconds after 1969
Last calibration done at 1134501607 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2005/12/13 19:23:36
Hw clock time : 2005/12/13 19:23:36 = 1134501816 seconds since 1969
Tue 13 Dec 2005 08:23:36 PM CET  -0.466655 seconds
What /dev/rtc stands for. Some kernel module i'm missing?
 
Old 12-13-2005, 01:52 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
rtc= real time clock
 
Old 12-13-2005, 02:06 PM   #3
Peter Aleksic
LQ Newbie
 
Registered: Nov 2004
Location: Belgrade, Serbia
Distribution: CentOS, Debian, FreeBSD
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Komakino
rtc= real time clock
and module name is?

# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
 
  


Reply



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
hwclock problems =[ alphisb0t Linux - General 1 03-16-2005 09:43 PM
hwclock alaios Linux - General 1 11-02-2004 08:40 AM
hwclock - HTS Linux - Software 4 10-28-2004 02:21 AM
hwclock problem conure Linux - Newbie 2 04-11-2004 07:10 PM
hwclock problem???? cancel_T Linux - General 2 08-02-2002 04:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:49 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
Open Source Consulting | Domain Registration