<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<pre><i>>Now I notice 'PST'. That's somewhere in the USA. It's just another
>timezone. I missed this the first time, probably because apart from a whole
>number of hours, there was also a 5 minute difference.
>
>Sure, if it's 16:40 over here in europe, it's 07:40am in one of the USA
>timezones. That's no surprise.
>
>Try this:
>
>$ unixtime 1235403634
>2009-02-23T15:40:34Z
>
>that means its done at 15:40:34 internally, which translates to 16:40:34
>your local time.
>
>'unixtime' is a bash function I've written:
>
>unixtime ()
>{
> /bin/date -ud 1970-01-01\ 00:00\ +0000\ +${1}sec +%Y-%m-%dT%H:%M:%SZ
>}
>
>
>(if someone knows a better function: please do share!)
>
>
<We now know:
>
>a: "N" is working as expected
>b: you should read the information on the page I sent you the link for
>c: I should pay more attention to 'PST' next time. Sorry
</i>Hi,
I think that you are right and I was also confused by the PST...
I also agree with your points a and b, while c is a bit more up to discussion :-)
Anyway I have now read your page and I think that I have the time right in my database:
$ rrdtool last mirror/weather_db/measure.rrd
1235459299
$ ./unixtime 1235459299
2009-02-24T07:08:19Z
$ TZ="UTC" date; date
Tue Feb 24 07:10:32 UTC 2009
Tue Feb 24 08:10:32 CET 2009
So, it looks to me like rrdtool uses UTC time which is lagging my local
time by one hour (as expected). Do I have to bother about that one hour?
The reason for me to start looking into this was that all of a sudden I
could not get reasonable results out of my databases.
In the three first printouts below you could see what I get when I use
the "info" functionality in rrdtool. I get values that seem reasonable
(temperature, humidity and dew point in my cellar), but when using fetch
to try to get the average value (over 10 minutes) I always get the same
out of the database. The values you see in the last printout below are
the same as I got 24 hours earlier as well as some 48 hours earlier. I
update my databases with values every 120 seconds. So now, while the printouts
from "info" changes every time the printouts from "fetch" are constant :-(
I am getting quite confused by this, as it was working for one and a half
year before this. And I don't know what I have done to make this happen...
If I look at temp4 sensor,
$ rrdtool info /home/mats/mirror/weather_db/measure.rrd | egrep -r 'temp4'
ds[temp4].type = "GAUGE"
ds[temp4].minimal_heartbeat = 200
ds[temp4].min = -5.5000000000e+01
ds[temp4].max = 1.2500000000e+02
ds[temp4].last_ds = "8.562500"
ds[temp4].value = 1.7203428219e+02
ds[temp4].unknown_sec = 0
$ rrdtool info /home/mats/mirror/weather_db/measure.rrd | egrep -r 'humi4'
ds[humi4].type = "GAUGE"
ds[humi4].minimal_heartbeat = 200
ds[humi4].min = 0.0000000000e+00
ds[humi4].max = 1.0000000000e+02
ds[humi4].last_ds = "59.970413"
ds[humi4].value = 1.2138135130e+03
ds[humi4].unknown_sec = 0
$ rrdtool info /home/mats/mirror/weather_db/measure.rrd | egrep -r 'dew4'
ds[dew4].type = "GAUGE"
ds[dew4].minimal_heartbeat = 200
ds[dew4].min = -5.5000000000e+01
ds[dew4].max = 1.2500000000e+02
ds[dew4].last_ds = "0.891537"
ds[dew4].value = 1.8044892537e+01
ds[dew4].unknown_sec = 0
$ rrdtool fetch /home/mats/mirror/weather_db/measure.rrd AVERAGE -s -600
temp4 humi4 dew4 temp5
humi5 dew5 temp1
humi1 dew1 bar1 temp2
humi2 dew2 temp3
humi3 dew3 windd winds
windc windp spare1
spare2 spare3 spare4
1235459400: 1.7437500000e+01 6.3446127881e+01 1.0193586429e+01
2.1562500000e+01 4.4905967715e+01 9.1123890189e+00 8.6875000000e+00
7.1684148964e+01 3.3759547545e+00 1.0132466430e+03 2.3187500000e+01
4.7625253535e+01 1.1022871331e+01 nan nan nan 2.6728257455e+02
3.4514897329e-01 8.6875000000e+00 1.1879225535e+01 nan nan nan nan
1235460000: nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
nan nan nan nan nan nan nan nan nan
Best regards, Mats
<i>
</i></pre>
</body>
</html>