<div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">Hi All,</div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">I had some doubts in the ceilometer timestamp field.</div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">


A couple of experimentation I did with it is resulting in conflicting results and I feel I am missing something here. </div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">
Could anyone please help me clarify this.</div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">


As per the V2 specs, every timestamp recorded/queried is in UTC</div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">


This implies the timestamp in the queries I make, must also be in UTC.(i.e timestamp>UTCTIME(A) and timestamp<UTCTIME(B))</div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">


<br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">When I specify the period to be 86400s (i.e I am querying to collect the statistics data on a day period basis), I observe that the period_end and period_start are not at 00.00.00. i.e not at the daytime boundary.</div>


<div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">Instead, I observe that the period_start/end time starts from 7.00am (I am in PDT), which means the data is in UTC, and as an example it when it reports 7/15/2013, 00:07:00, it means 7/15/2013, 00:00:00 PDT time.</div>


<div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">
But however, I am in doubt for the TIMESTAMP I specify in the query information.</div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">I intend to get the usage details for the day between 7/15/2013 00:00:00 and 7/16/2013:00:00:00. I am interested in my machine detais which are in PDT</div>


<div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">
1). If I specify the query to have timestamp > 7/15/2013, <b>00:00:00</b>(Isnt this the PDT time midnight), the period_start and period_end timestamp have values starting at <b>7.00am</b>(which is right though I specified the input query without UTC converted time )</div>


<div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">Example: </div><div><font color="#222222" face="arial, sans-serif"><i>curl -H 'X-Auth-Token: '$TOKEN'' "<a href="http://localhost:8777/v2/meters/vcpus/statistics?q.field=timestamp&q.op=gt&q.value=2013-07-16T" target="_blank">http://localhost:8777/v2/meters/vcpus/statistics?q.field=timestamp&q.op=gt&q.value=2013-07-16T</a><b>00:00:00</b>&q.field=timestamp&q.op=lt&q.value=2013-07-17T<b>00:00:00</b>&q.field=user_id&q.op=eq&q.value=374b853b7bd34212b061d3d03ea4d71a&period=86400"</i></font></div>


<div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">
One of the stats result: </div><div><div><font color="#222222" face="arial, sans-serif">  {</font></div><div><font color="#222222" face="arial, sans-serif">    "sum": 7,</font></div>
<div><font color="#222222" face="arial, sans-serif">    "avg": 1,</font></div><div><font color="#222222" face="arial, sans-serif">    "period_start": "2013-07-15T<b>07:00:00</b>",</font></div>


<div><font color="#222222" face="arial, sans-serif">    "count": 7,</font></div><div><font color="#222222" face="arial, sans-serif">    "duration_start": "2013-07-16T00:00:39.467000",</font></div>


<div><font color="#222222" face="arial, sans-serif">    "min": 1,</font></div><div><font color="#222222" face="arial, sans-serif">    "max": 1,</font></div><div><font color="#222222" face="arial, sans-serif">    "duration_end": "2013-07-16T06:00:42.637000",</font></div>


<div><font color="#222222" face="arial, sans-serif">    "period": 86400,</font></div><div><font color="#222222" face="arial, sans-serif">    "period_end": "2013-07-16T<b>07:00:00</b>",</font></div>


<div><font color="#222222" face="arial, sans-serif">    "duration": 21603.17</font></div><div><font color="#222222" face="arial, sans-serif">  }</font></div></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">


<br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">
2). If I specify the query to have timestamp > 7/15/2013, <b>07:00:00</b>(UTC time for 7/15/13,00:00:00PDT), the period_start and end timestamp have values starting at <b>14:00:00</b> (which I believe is wrong though I specified the input query with the right timestamp conversion)</div>


<div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">Example:</div><div><div><font color="#222222" face="arial, sans-serif"><i> curl -H 'X-Auth-Token: '$TOKEN'' "<a href="http://localhost:8777/v2/meters/vcpus/statistics?q.field=timestamp&q.op=gt&q.value=2013-07-16T07:00:00&q.field=timestamp&q.op=lt&q.value=2013-07-17T07:00:00&q.field=user_id&q.op=eq&q.value=374b853b7bd34212b061d3d03ea4d71a&period=86400" target="_blank">http://localhost:8777/v2/meters/vcpus/statistics?q.field=timestamp&q.op=gt&q.value=2013-07-16T07:00:00&q.field=timestamp&q.op=lt&q.value=2013-07-17T07:00:00&q.field=user_id&q.op=eq&q.value=374b853b7bd34212b061d3d03ea4d71a&period=86400</a>" </i></font></div>


<div><font color="#222222" face="arial, sans-serif"><i><br></i></font></div><div><font color="#222222" face="arial, sans-serif">One of the stats result:</font></div><div><font color="#222222" face="arial, sans-serif"><div>


  {</div><div>    "sum": 7,</div><div>    "avg": 1,</div><div>    "period_start": "2013-07-15T<b>14:00:00</b>",</div><div>    "count": 7,</div><div>    "duration_start": "2013-07-16T07:00:37.546000",</div>


<div>    "min": 1,</div><div>    "max": 1,</div><div>    "duration_end": "2013-07-16T13:00:08.729000",</div><div>    "period": 86400,</div><div>    "period_end": "2013-07-16T<b>14:00:00</b>",</div>


<div>    "duration": 21571.183</div><div>  }</div></font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">


<br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">I am not able to wrap my head around with this concept.</div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">


Could anyone please help me in getting this concept resolved?</div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">


Thanks,</div><div style="color:rgb(34,34,34);font-size:12.727272033691406px;font-family:arial,sans-serif">Deepak</div>