log file timestamp

J Davis mrsalty0 at gmail.com
Thu Jun 19 16:07:01 MSD 2008


here's the output...
07:58 1 18000
date: Thu Jun 19 07:58:26 EDT 2008
date -u: Thu Jun 19 11:58:27 UTC 2008

-Jake


On Wed, Jun 18, 2008 at 4:54 PM, Igor Sysoev <is at rambler-co.ru> wrote:

> On Wed, Jun 18, 2008 at 03:51:37PM -0400, J Davis wrote:
>
> > I think you are on to something.
> >
> > date:  Wed Jun 18 15:23:03 EDT 2008
> > date -u: Wed Jun 18 19:23:05 UTC 2008
> > access.log: 18/Jun/2008:14:23:34 -0500
> >
> > I made sure that my tzdata package was up to date and that /etc/localtime
> > points to the correct zone at /usr/share/zoneinfo/America/New_York. I
> then
> > gave nginx the HUP signal (not sure if that was necessary).
> >
> > but the time stamps are still 1 hour behind.
>
> Could you build the program below and run it together with date and date -u
> ?
>
> ----------
> #ifndef _GNU_SOURCE
> #define _GNU_SOURCE
> #endif
>
> #include <time.h>
> #include <stdio.h>
>
> int
> main()
> {
>    time_t      s;
>    struct tm   t;
>
>    tzset();
>
>    s = time(NULL);
>
>    (void) localtime_r(&s, &t);
>
>    printf("%02d:%02d %d %d\n", t.tm_hour, t.tm_min, t.tm_isdst, timezone);
>
>    return 0;
> }
> ----------
>
> Also could you send the output of nginx's ./configure ?
>
> > -Jake
> >
> >
> > On Wed, Jun 18, 2008 at 2:52 PM, Igor Sysoev <is at rambler-co.ru> wrote:
> >
> > > On Wed, Jun 18, 2008 at 02:10:37PM -0400, J Davis wrote:
> > >
> > > > I'm trying to figure out why my nginx access log timestamps are an
> hour
> > > > behind the actual time.
> > > > I've confirmed that the "date" and "hwclock" commands both return the
> > > proper
> > > > values on the system and that the timezone is correct but the
> timestamps
> > > in
> > > > the nginx logs are all an hour off.
> > > > I realize this may not be an Nginx problem but I'm not sure how else
> to
> > > > narrow down the possibilities.
> > > >
> > > > Any insights are greatly appreciated.
> > > >
> > > > RedHat el5  - 2.6.18-8.el5
> > > > nginx/0.6.29
> > >
> > > This may be incorrectly set daylight saving time offset.
> > > Could you show last line from access log and output of
> > >
> > >    date
> > >
> > > and
> > >
> > >    date -u
> > >
> > > ?
> > >
> > >
> > > --
> > > Igor Sysoev
> > > http://sysoev.ru/en/
> > >
> > >
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080619/e2c4aea9/attachment.html>


More information about the nginx mailing list