LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-01-2004, 10:10 PM   #1
Jim Miller
Member
 
Registered: Sep 2001
Posts: 35

Rep: Reputation: 15
12 and 24 hour clock timings -- arggh!


A probably blindingly-obvious question, but its answer continues to escape me: I have two x86 boxes both running virtually identical versions of RedHat 9. Unfortunately, one of these machines is not successfully working with my backup system (Dantz Retrospect), while the other one works fine. I've narrowed it down to the following situation:

GoodMachine: hwclock --debug
hwclock from util-linux-2.11y
Using /dev/rtc interface to clock.
Last drift adjustment done at 1077909647 seconds after 1969
Last calibration done at 1077909647 seconds after 1969
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2004/03/01 19:51:14
Hw clock time : 2004/03/01 19:51:14 = 1078199474 seconds since 1969
Mon Mar 1 19:51:14 2004 -0.813675 seconds

BadMachine: hwclock --debug
hwclock from util-linux-2.11y
Using /dev/rtc interface to clock.
Last drift adjustment done at 1078199348 seconds after 1969
Last calibration done at 1078199348 seconds after 1969
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2004/03/01 19:50:48
Hw clock time : 2004/03/01 19:50:48 = 1078199448 seconds since 1969
Mon 01 Mar 2004 07:50:48 PM PST -0.295439 seconds

The difference, of course, is in the last lines of the output, which show that GoodMachine is in one situation, while BadMachine is in the other. I'm assuming that this is because of something I did to BadMachine at some time in the past, and that if I can get BadMachine's hardware clock into the same state as GoodMachine, my problems will go away. But, so far, I haven't found the magic incantation. Can anyone help with this? As I said, it's probably bleeding obvious, but I just haven't been able to find it.

It may be worth mentioning that I also have a Windows ME partition on this machine, so Windows has occasionally gotten its hands on the clock...

Thanks,
Jim
 
Old 03-01-2004, 11:23 PM   #2
witeshark
Member
 
Registered: Jan 2004
Location: Miami FL
Distribution: Mac OS X 10.4.11 Ubuntu 12.04 LTS
Posts: 429

Rep: Reputation: 30
Hw clock time : 2004/03/01 19:51:14 = 1078199474 seconds since 1969
Mon Mar 1 19:51:14 2004 -0.813675 seconds
Hw clock time : 2004/03/01 19:50:48 = 1078199448 seconds since 1969
Mon 01 Mar 2004 07:50:48 PM PST -0.295439 seconds
The good machine is showing output in European 24 hour (purple) and the other in 12 hour (green) it seems the back up system relies on the 24 hour format to time backups.

Last edited by witeshark; 03-01-2004 at 11:25 PM.
 
Old 03-01-2004, 11:37 PM   #3
Jim Miller
Member
 
Registered: Sep 2001
Posts: 35

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by witeshark
...The good machine is showing output in European 24 hour (purple) and the other in 12 hour (green) it seems the back up system relies on the 24 hour format to time backups.[/color] [/B]
I agree(!). So, how do I get BadMachine to use 24 hour time?
 
Old 03-01-2004, 11:44 PM   #4
witeshark
Member
 
Registered: Jan 2004
Location: Miami FL
Distribution: Mac OS X 10.4.11 Ubuntu 12.04 LTS
Posts: 429

Rep: Reputation: 30
Quote:
Originally posted by Jim Miller
I agree(!). So, how do I get BadMachine to use 24 hour time?
There is certainly a way to get the second machine set to Military/24 hour clock, that work as a start.
 
Old 03-01-2004, 11:49 PM   #5
Jim Miller
Member
 
Registered: Sep 2001
Posts: 35

Original Poster
Rep: Reputation: 15
So, what >>is<< that way????
 
Old 03-02-2004, 12:35 PM   #6
witeshark
Member
 
Registered: Jan 2004
Location: Miami FL
Distribution: Mac OS X 10.4.11 Ubuntu 12.04 LTS
Posts: 429

Rep: Reputation: 30
Quote:
Originally posted by Jim Miller
So, what >>is<< that way????
It depends on the machine, on some it's in system preferences. Or it may be possible to click on the clock and find options there.
 
Old 03-02-2004, 03:30 PM   #7
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
My understanding with the clock in the menu bar is that it just re-interpolates the time in the system or bios clock, and that the bios clock is always a 24 hour clock...

Boot the machine up fresh and enter the bios,... maybe I'm wrong here. Maybe the bios can be set to 12 hr time versus 24 hr time.

Then again, Linux can do a time offset based upon where you are located if the bios clock is set to GMT.
 
Old 03-02-2004, 11:23 PM   #8
Jim Miller
Member
 
Registered: Sep 2001
Posts: 35

Original Poster
Rep: Reputation: 15
I've been in the BIOS, and there is nothing regarding the clock other than setting its time and date -- no timezone stuff, no 12/24 choices.

Sheesh...

Thanks,
Jim
 
Old 03-02-2004, 11:30 PM   #9
witeshark
Member
 
Registered: Jan 2004
Location: Miami FL
Distribution: Mac OS X 10.4.11 Ubuntu 12.04 LTS
Posts: 429

Rep: Reputation: 30
What is your box? This is what I need to give a useful answer.
 
Old 03-02-2004, 11:31 PM   #10
tearinox
Member
 
Registered: Aug 2003
Location: you dont want to know
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348

Rep: Reputation: 30
Well, I know in my fluxbox setup, I had to just change some stuff in the ~/init directory to change the systembars clock setup.

Whatever program is displaying the clock or w/e, just read the manual and find out =P
 
Old 03-02-2004, 11:42 PM   #11
witeshark
Member
 
Registered: Jan 2004
Location: Miami FL
Distribution: Mac OS X 10.4.11 Ubuntu 12.04 LTS
Posts: 429

Rep: Reputation: 30
well this is what I am saying -- it's a box hardware setting and DONE - all fixed
 
Old 07-17-2007, 05:31 PM   #12
gnuzilla
LQ Newbie
 
Registered: Apr 2006
Location: Chagrin Falls, OH
Distribution: Ubuntu / Debian
Posts: 17

Rep: Reputation: Disabled
the bios is always in 24/ hour format

the bios is always in 24/ hour format....period
 
Old 07-17-2007, 06:19 PM   #13
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
I'm surprised you found this, the post prior to yours was 3 years ago.
 
Old 07-17-2007, 06:54 PM   #14
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
hwclock uses strftime "%c" format to display the date.

From strftime manual page ( http://man.linuxquestions.org/index....ction=0&type=2 )

%c means "The preferred date and time representation for the current locale."

The locale must be different between the environments.

Check LC_DATE, LC_ALL or similar variables.

I'm surprised your locale could be a H/W setting on your machines.

Last edited by jlliagre; 07-17-2007 at 06:56 PM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Aergh. X dies on the hour, every hour l00zer Linux - Software 4 06-07-2005 10:02 PM
change clock from 24 hour to 12 hour in suse 9.2/KDE 3.3 jmlumpkin Linux - Newbie 1 01-22-2005 11:45 PM
iwconfig arggh.. radioradio Linux - Wireless Networking 16 11-17-2004 03:37 PM
KDE clock 1 hour off system time monkeyman2000 Debian 2 09-04-2004 12:29 AM
clock keeps going forward one hour every reboot. Frustin Linux - General 2 08-08-2002 02:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:59 AM.

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