morellon/rrd-ffi — Issue #13: :start not working?
Author: matejuh
Created: 2012-01-17 22:28:42+00:00
State: open

I cant set start date. It is set to -24 hours.

This is working with rrdtool:

```rrdtool create target.rrd \
> --start 1326067200 \
> --step 86400 \
> DS:mem:GAUGE:600:0:1001 \
> RRA:LAST:0.5:1:10
```

Produces:

rrdtool fetch target.rrd LAST --start 1326067200
mem

1326153600: -nan
1326240000: -nan
1326326400: -nan
1326412800: -nan
1326499200: -nan
1326585600: -nan
1326672000: -nan
1326758400: -nan
1326844800: -nan

How expected.

But RAW API:

RRD::Wrapper.create "myrrd.rrd","--start", "1326067200", "--step", "86400", "DS:values:GAUGE:172800:0:1001", "RRA:LAST:0.5:1:10"

Produces:
RRD::Wrapper.fetch "myrrd.rrd", "LAST"
=> [["time", "values"], [0, NaN]]

And DSLs:
```rrd.create :start => -10.days, :step => 1.day do
ruby-1.9.2-p290 :124 > datasource "values", :type => :gauge, :heartbeat => 2.days, :min => 0, :max => 1001
ruby-1.9.2-p290 :125?> archive :last, :every => 1.day, :during => 11.days
ruby-1.9.2-p290 :126?> end
```

Produces:

``` rrd.fetch(:last).each {|line| puts line.inspect}
["time", "values"]
[1326672000, NaN]
[1326758400, NaN]
=> [["time", "values"], [1326672000, NaN], [1326758400, NaN]]
```

I thought Im using DSLs archive wrong, or thats problem in DSLs, but it looks like problem in something else.

Can you try it, please and check it?