Ticket #7 (new defect)

Opened 3 years ago

argument "--now" behaves strangely

Reported by: human Owned by: somebody
Priority: minor Milestone:
Component: component1 Version:
Keywords: Cc:

Description

Hi,

It's probably someting I just don't understand, but I've read both du2rrd code and all the available documentation without finding an explanation.

I'm trying to use --now=time to make tests with du2rrd without having to wait for the next day for an update.

First test:

  • deletion of all rrd files and folder.
  • injection of data with --now= value in seconds from Epoch set to the date "now - 1 day".
  • injection of data without --now option.
  • dump of an rrd file: 3 rows instead of 2. First row at "2 days old", second row at "yesterday", third row at "today".

Second test:

  • deletion of all rrd files and folder.
  • injection of data with --now=$(date +%s)
  • dump of an rrd file: 2 rows instead of 1. First row at "yesterday", second row at "today".

example, with date +%s around 1245221194 it gives:

	<!-- 2009-06-16 02:00:00 CEST / 1245110400 --> <row><v> 7.7363195904e+10 </v></row>
	<!-- 2009-06-17 02:00:00 CEST / 1245196800 --> <row><v> 7.7363195904e+10 </v></row>

I believe using time in seconds since Epoch should prevent any TZ issue, but may be I'm missing something, and I'm quite PERL illiterate…

Note: See TracTickets for help on using tickets.