| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Thu Jan 24, 2008 9:49 pm Post subject: Wrong time in icecast logs |
|
|
Hello to all,
I have a problem with Icecast logging... The Linux server, where icecast is installed, has set hardware and system clock to SanFrancisco timezone. When look into logs, I can see that time is 6 hours on in relation to system (hardware) clock???? I cleaned all the logs, cleaned tmp folders, restarted icecast, restarted server, recompiled icecast... but didn't resolve the proble....
What can be the problem???
Milos |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Jan 24, 2008 10:44 pm Post subject: |
|
|
You have probably configured the hardware clock setting to be UTC but set it to a local time so when the system tries to get the localtime it takes the system clock and applies the timezone difference. You should find that configuring the hardware clock to UTC time will resolve it (and the hardware doesn't have to be modified twice a year).
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Jan 25, 2008 9:16 am Post subject: |
|
|
System time is set to local time. In /etc/sysconfig/clock UTC variable is set to false. When I type date and hwclock in console, it shows the same clock value.
Than, what can be a problem???
Milos |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Jan 25, 2008 3:05 pm Post subject: |
|
|
Timezone configured propertly. /etc/localtime is simbolic link to /usr/share/zoneinfo/America/Los_Angeles (the same timezone as SF)
ZONE value in /etc/sysconfig/clock is set to America/Los_Angeles.
Tried changing timezone to Europe/Athens, but doesn't resolve my problem. The time in icecast logs isn't correct.
Any ideas?
Milos |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Jan 25, 2008 3:29 pm Post subject: |
|
|
| Maybe icecast shows time in UTC? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jan 25, 2008 5:28 pm Post subject: |
|
|
icecast shows time in whatever your localtime is. You haven't said whether you have configured your hwclock as UTC or not, check the man page?
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Jan 25, 2008 5:31 pm Post subject: |
|
|
#hwclock
Fri 25 Jan 2008 11:30:29 AM CST -0.035231 seconds
#date
Fri Jan 25 09:31:09 CST 2008
No, hardware clock is not configured as UTC:
#cat /etc/sysconfig/clock
ZONE="America/Los_Angeles"
UTC=false
ARC=false
#ls -l /etc/localtime
lrwxrwxrwx 1 root root 39 Jan 25 08:58 /etc/localtime -> /usr/share/zoneinfo/America/Los_Angeles |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jan 25, 2008 6:14 pm Post subject: |
|
|
The hwclock and date times don't match, sounds like something more system related, which one is correct?. BTW CST applies to Los Angeles? are you running anything like rdate or ntp?
Personally I would keep the hwclock as UTC that way it doesn't have to change for daylight savings.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Jan 25, 2008 6:29 pm Post subject: |
|
|
The time dismatch between hardware and system clock is because I didn't type the commands at the same time. It's just a 30 seconds difference.
No, I am not running rdate nor ntp.
Milos |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jan 25, 2008 10:28 pm Post subject: |
|
|
check again, the difference between 11:30:29 and 09:31:09 is more than 30 seconds.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Jan 25, 2008 10:33 pm Post subject: |
|
|
Sorry, I didn't look into the output. Sinchronized the clocks, but again the same problem. Difference between system time and time in logs is 6 hours.
Milos |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jan 25, 2008 11:13 pm Post subject: |
|
|
Well North American CST is -600 so that is probably where the 6 hours difference comes from. What I don't know is why a difference is being applied if the system time (ie date) is correct for localtime. Make sure there are no tzname environment vars for icecast and maybe email me an strace of icecast to see what values are being given (strace -f -v -o output.txt icecast -c ....)
karl. |
|
| Back to top |
|
 |
|