[rrd-users] Timestamp problem
Alex van den Bogaerdt
alex at vandenbogaerdt.nl
Mon Feb 23 16:17:14 CET 2009
----- Original Message -----
From: "Mats Gustafsson" <gentoo at mats-gustafsson.se>
To: <rrd-users at lists.oetiker.ch>; "Mats Gustafsson"
<gentoo at mats-gustafsson.se>
Sent: Monday, February 23, 2009 2:05 PM
Subject: [rrd-users] Timestamp problem
>I have been running rrdtool for nearly two years now with no problems,
> but now I all of a sudden have started to experience some strange things.
> One thing that I just realized is that the timestamp does not behave as
> I expected. If I for example at 2009/02923 01:50 pm updates my database
> like this:
> $ rrdtool update /home/mats/mirror/weather_db/measure3.rrd
> And then look at the timestamp of the last update:
> $ rrdtool last /home/mats/mirror/weather_db/measure3.rrd
> The timestamp indicates that the last update was done at 2009/02/23
> 04:45:10 am PST.
And that's most likely the case.
Why are you so sure that it is 01:50pm ?
Check your computer's time. It doesn't matter what the clock on the wall
shows, "date +%s" or similar is what counts.
This example from my site: http://www.vandenbogaerdt.nl/rrdtool/timezone.php
perl -e 'print gmtime(time)."\n".localtime(time)."\n"'
it should show UTC time and local time. You are on european time, so there
should be one hour difference in it, no more no less.
I ran it at 16:12:18 my time (also european time):
$ perl -e 'print gmtime(time)."\n".localtime(time)."\n"'
Mon Feb 23 15:12:18 2009
Mon Feb 23 16:12:18 2009
More information about the rrd-users