LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags , , , , ,

Reply
 
Thread Tools
Old 01-30-2009, 05:55 AM   #1
falc410
LQ Newbie
 
Registered: Jan 2009
Posts: 5
Thanked: 0
syslog time wrong - but date returns the correct time?


[Log in to get rid of this advertisement]
I have a weird problem with two RedHat 5 machines.

When I type date I get the correct time returned, but when I check the syslog all the times are one hour off.
I have searched the forums but I didn't really find a solution. When I create a new file, it also has the correct time, so it really only appears wrong in all the log files under /var/log which is very very annoying!

Now I have a ntp server configured and I think the hardware clock is fine, maybe it is a timezone problem, but I'm not sure.

I'm located in Germany, so that should be GMT+1.

The only thing I found which has anything to do with the timezone is /etc/sysconfing/clock and it looks like this:

ZONE="UTC"
UTC=true
ARC=false

I don't know if these are the correct values or not. Any help is appreciated.
falc410 is offline  
Tag This Post , , , , ,
Reply With Quote
Old 01-30-2009, 07:55 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732
Thanked: 6
Are you confusing the system timestamps (UTC) with your local time? UNIX has historically used UTC for file timestamps (and almost everything else). Individual users can set their time zone on a per-process basis, so you can run multiple instances of 'pingus' each with a different time zone. Using local times to mark files etc just doesn't make any sense on any *NIX system. Even before UNIX, many computer applications (bank transactions, airline tickets, etc) involved multiple users from all over the planet performing operations on the computer. If someone updated data, how do you know when the last change was made? Simple - use a single time (UTC) for all transactions. If a user wanted to see results displayed in their own time zone, all they had to do was set the time zone appropriately and any timezone-aware program would adjust what the user sees.
pinniped is offline     Reply With Quote
Old 01-30-2009, 08:05 AM   #3
falc410
LQ Newbie
 
Registered: Jan 2009
Posts: 5
Thanked: 0

Original Poster
Well I thank you for the explanation but I did only understand half of it.

I will try to explain my problem once more. Right now it is 2 pm in Germany. I log in to the server and run the following commands:

[root@nagios2 nagios]# date
Fri Jan 30 14:01:06 CET 2009
[root@nagios2 nagios]# wall test

Broadcast message from root (pts/0) (Fri Jan 30 13:01:18 2009)

Do you see the difference?
Funny thing is, depending on the software if I check /var/log/messages the timestamp is either correct or one hour off:

Jan 30 14:01:18 nagios2 wall[1636]: wall: user root broadcasted 1 lines (6 chars)

This is the correct time, but other software is sometimes one hour off, this causes quite a few problems. Here is a copy and paste of my /var/log/messages:

Quote:
Jan 30 12:07:54 nagios2 pengine: [3758]: info: process_pe_message: Configuration WARNINGs found during PE processing. Please
run "crm_verify -L" to identify issues.
Jan 30 13:08:20 nagios2 haclient: on_event:evt:cib_changed
Jan 30 13:08:20 nagios2 haclient: on_event:evt:cib_changed
Jan 30 13:08:20 nagios2 haclient: on_event: from message queue: evt:cib_changed
Jan 30 12:14:51 nagios2 cib: [3177]: info: cib_stats: Processed 104 operations (5000.00us average, 0% utilization) in the las
t 10min
Do you see what is happening? All those entries were in a timeframe of 7 minutes, but the logfiles recorded it with different hours, making the logfiles quite unreadable since you never can be sure what time it really was and you can't be sure if this happened in the right order or not.
falc410 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
System time correct for root, wrong for normal user? dx0r515t Slackware 2 07-21-2006 06:30 PM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 11:17 AM
time and date not correct, after reboot vasanthraghavan Linux - General 4 03-10-2005 12:55 PM
Date and time always wrong snatale1 Linux - General 6 12-13-2003 11:27 PM


All times are GMT -5. The time now is 02:20 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration