Kapacitor is taking a wrong time format
<p>I'm using InfluxData stack for anomaly detection in time series data, using InfluxDB and Kapacitor. </p>

<p>I collected some open source <a href="https://github.com/numenta/NAB/blob/master/data/realKnownCause/nyc_taxi.csv" rel="nofollow">samples</a> and set the following tick script for detecting anomalies:</p>

<pre><code>batch
    .query('select mean(value) from "nycTaxi"."default"."nycTaxi"')
        .period(1h)
        .every(2h)
        .groupBy(time(1h))
.mapReduce(influxql.percentile('mean', 90.0))
    .eval(lambda: sigma("percentile"))
        .as('sigma')
        .keep('percentile', 'sigma')
    .alert()
        .warn(lambda: "sigma" &gt; 2.0)
        .log('/path/alerts.log')
        .crit(lambda: "sigma" &gt; 3.0)
        .log('/path/alerts.log')
</code></pre>

<p>Obtaining alerts like the following: </p>

<pre><code> {"id":"nycTaxi:nil",
  "message":"nycTaxi:nil is WARNING",
  "time":"2016-09-13T14:43:21.892057062Z",
  "level":"WARNING",
  "data":{  
    "series":[  
      {  
        "name":"nycTaxi",
        "columns":[  
          "time",
          "percentile",
          "sigma"
        ],
        "values":[  
          [  
            "2016-09-13T14:43:21.892057062Z",
            1279,
            2.002345963142575
  ]]}]}}
</code></pre>

<p>To record the data I used this line <code>kapacitor record batch -start 2014-07-01T00:00:00Z -stop 2015-02-31T00:00:00Z -name nyc</code></p>

<p>For some reason Kapacitor interprets the time as a 2016 date when in the DB the oldest date is 2015-01-31. Why does this happen?</p>