Displayed Timestamps on the web interface

Fiederling, Daniel daniel.fiederling at warema.de
Thu Aug 5 10:42:49 CEST 2004


Hi list,

I've already posted this to the Users-List, but there where no answers.
Perhaps you can help:

----------------------------------------------------------------------------
---
I have Nagios running for about 4 weeks and I really like it and there is
the plan to substitue BigBrother with Nagios. But there is one problem with
the web interface: the timestamps displayed are wrong (for example in
extinfo.cgi). They are always +2h. The timestamp display in "Current Network
Status" / Last Updated (the box in the upper left) is correct.

I have found some questions about that issue in the list archive but no
answers. The FAQ says nothing about timezones / wrong timestamps. Can
anybody help me?

My system is a SuSE 8.2 box with Nagios 1.2 (2004-02-02). My system time is
local time (CEST), synchronized with xntp to our main time server. I use
PostgreSQL for data storage. The timestamps in the database are displayed
correct with psql - maybe psql adjusts the display to the current timezone,
I don't know.

I think, GMT is our local time - 2h, or in other words CEST is GMT+2 (not
sure about that!). I don't know if that's a hint to the problem.
----------------------------------------------------------------------------
---

In the meantime I tried to alter the function get_time_string() in
cgiutils.c, without success. I think that timestamps read from the database
are thought as being UTC but they are already CEST. The localtime()-call in
cgiutils.c adds 2h and I get the wrong times on the web interface. Any tipps
for me?

Please help me!
Daniel




-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com




More information about the Developers mailing list