You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Steven Zhu <St...@springbow.com> on 2000/07/15 18:45:26 UTC

Web server log wrong time.

Hi All:

I compiled and installed new web server (most recent apache and mod
perl). Every is fine except that all scripts show wrong time. But it is
not only script problem. If i checked with the access.log file, the log
time is also wrong. For instance, the current local time is 11:38
and my system time is also 11:38. But the script shows the result: 16:38
and access.log file shows 16:38. it is always 5 hrs more. It is really
timezone problem. I compiled apache many times, never met the situation.
Because it was compiled by local machne, the default timezone should be
same as my local machine timezone but it is not. How can i reset the
timezone from httpd.conf or Do i need to recompile the apache or any
another way i can do? Please help me. Thank you very much...

Steven.


Re: Web server log wrong time.

Posted by Steven Zhu <St...@springbow.com>.
Hi Jim:

We are starting httpd web server as root, then spawn httpd as www. They all
have timezone setup as CDT. I checked the date from different shell. They are
all correct. I have /etc/localtime pointing to /usr/share/zoneinfo/US/Central.
I don't know why it uses raw clock. Thank you very much.

Steven.

Jim Woodgate wrote:

> Steven Zhu writes:
>  > I compiled and installed new web server (most recent apache and mod
>  > perl). Every is fine except that all scripts show wrong time. But it is
>  > not only script problem. If i checked with the access.log file, the log
>  > time is also wrong. For instance, the current local time is 11:38
>  > and my system time is also 11:38. But the script shows the result: 16:38
>  > and access.log file shows 16:38. it is always 5 hrs more. It is really
>  > timezone problem. I compiled apache many times, never met the situation.
>  > Because it was compiled by local machne, the default timezone should be
>  > same as my local machine timezone but it is not. How can i reset the
>  > timezone from httpd.conf or Do i need to recompile the apache or any
>  > another way i can do? Please help me. Thank you very much...
>
> are you running httpd as yourself or another user?  The 5 hour time
> difference sounds like it's using the raw clock and no timezone...
>
> If you are running httpd as yourself, you might want to try:
>
> $ sh date
>
> to make sure that shells you spawn also have the same date as your
> shell...
>
> --
> woody@bga.com