Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Timezone not being set correctly |
|
Author |
|
mer
Joined: 16 Jan 2010 Posts: 1
|
Posted: Sat 16 Jan '10 12:14 Post subject: Timezone not being set correctly |
|
|
Hi, I've got this problem on two centos 5.4 boxes running apache 2.2. Essentially the default timezone for apache is set to US/Eastern when it should be Australia/Adelaide.
This is causing me several problems, firstly, all the log timestamps say -0500 instead of +1030, secondly, many php graphing tools I run have graphs which are substantially off because of the timezone difference (I've tried setting the timezone in php.ini, it hasn't helped).
The system clock is updated with ntpd and the time is correct, the system timezone is also set correctly:
Code: | [root@Neptune bin]# ll /etc/localtime
lrwxrwxrwx 1 root root 38 Jan 16 13:07 /etc/localtime -> /usr/share/zoneinfo/Australia/Adelaide
[root@Neptune bin]# cat /etc/sysconfig/clock
ZONE="Australia/Adelaide"
UTC=true
ARC=false
[root@Neptune bin]# clock
Sat 16 Jan 2010 07:39:10 PM CST -0.616861 seconds
[root@Neptune bin]# date
Sat Jan 16 19:39:10 CST 2010
|
Yet apache logs still show -0500, and my graphs are still off by 15.5 hours:
Code: | 10.250.1.100 - - [16/Jan/2010:05:00:30 -0500] "GET / HTTP/1.1" 200 8 "-" |
Had a look through the httpd.conf, and I can't find anything relating to timezones. I've tried setting the timezone with SetEnv TZ Australia/Adelaide within httpd.conf and that also seems to have no effect.
From what I've been able to gather, apache gets it's timezone settings from the system, so the above config should work. If anyone has ideas as to what may have gone wrong, I'd appreciate the input. |
|
Back to top |
|
|
|
|
|
|