Stats endpoint start_time and end_time formats



When fetching stats, the documentation mentions that for the DAY granularity, start_time “must be midnight in the timezone of the account, relative to UTC” and that it “must look like: 2013-06-16T07:00:00Z”. However, this post shows that it is in fact possible to use a yyyy-MM-dd format. Is it correct to assume that if I use this latter format, the API will correctly returns stats for that day at midnight (in the timezone of the account)?

It seems like a huge hassle to have to specify precise midnight date times, especially with stuff like this popping up.


That’s correct, @CMP. If you omit the timestamps, the start and end times will be automatically translated to midnight in the account’s timezone.