[ 
https://issues.apache.org/jira/browse/JCLOUDS-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13734200#comment-13734200
 ] 

edo commented on JCLOUDS-240:
-----------------------------

I enabled logging. After some investigation, I have determined everything is 
working properly. The error is my fault.

I created a start and end date like so:

SimpleDateFormat isoFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
isoFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
Date startDate = isoFormat.parse("2013-08-05T00:00:00");
Date endDate = isoFormat.parse("2013-08-06T00:00:00");

I had expected the start date to be 2013-08-05, however, due to the time zones; 
the start date in the URL is 2013-08-04. When I was printing the usage records, 
it had converted the date to my local time zone, so the usage records were 
showing up with dates 2013-08-03.

Thank you Andrew for your time. I am going to close this ticket (if I can).
                
> listUsageRecords API for CloudStack: Start Date and End Date not taken into 
> account properly
> --------------------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-240
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-240
>             Project: jclouds
>          Issue Type: Bug
>    Affects Versions: 1.7.0, 1.6.1
>            Reporter: edo
>
> Provided a start and end date to listUsageRecords (i.e. 2013-08-05 and 
> 2013-08-06). However, the usage records contains dates outside that timeframe 
> specified.
> The interface used was: org.jclouds.cloudstack.features.GlobalUsageApi 
> listUsageRecords 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to