WRONG TIMESTAMP in postgresql

Ramiro Morales rm-rpms at gmx.net
Sun Oct 20 16:22:08 CEST 2002


On 20 Oct 2002 at 15:23, Martin Vit wrote about "[Nagios-users] WRONG TIMESTAMP in postgresql":

> hi i cannot find why i have bad time in postgre timestamp...
> 
> i'm using nagios 1.06b with postgresql 7.2 (redhat 6.2 with CEST time
> (europe-prague UTC+2)
> 
> dump in table "servicestatus" (time is 15:18)
> 
> host1       UP      2002-10-20 11:19:36+02  2002-10-20 11:19:08+02
> 2002-10-19 11:38:12+02  0       80148   0
>         0       1969-12-31 23:00:00+01  0       1       1       1      
>         PING
> OK - Packet loss = 0%, RTA = 13.35 ms      0
>         1       0       0       1       1
> 
> status.cgi:
> host1 PING WARNING 10-20-2002 11:17:55 0d 4h 0m 8s 2/3 PING WARNING -
> Packet loss = 20%, RTA = 43.82 ms
> 
> so time is 4hours back in postgre, other timing is right (log,
> sheduling, notification....)
> 
> anyone could help? or is it wrong inserting ?
> 

I had tought on asking you if you time zone has a
2 hours offset from UTC (seeing your 4 hours offset
problem).

I have no exepriences using Nagios plyus PostgreSQL but
this anecdote could help you.

Two years ago I configured a mail server at work. By that
time my country was considering switching from our usual
time zone of 3 hours to the west of Greenwich to a zone 
located 4 hours in the same direction. Red Hat Linux 6.2
(the OS/distribution I was using) shipped then with all the
cities of the country in the new zone.

As the plans of switchg were then canceleld by the government,
I had to select a no-name time zone from the tool privided
by the OS because no one of the named-after-cities zones
were useful to me: I selected UTC-3

After a few day I had reports of user that the mails they
received  had an offset of 6 hours compared to the real
time.

Then I read some doc, and learned thet the POSIX way of
naming my timezone is UTC+3 while the old Unix way
was -3. I was using the old syntax and Red Hat Linux 
(and I supopose all the currentLinux/Unix) support the
POSIX way. Correcting that solved the problem.

Maybe you are in a similar situation? be it a system-wide
time configuration or a time configuration of one of the
pieces of software at play

HTH

-
Ramiro



-------------------------------------------------------
This sf.net email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
https://www.gotomypc.com/s/OSND/DD




More information about the Users mailing list