Daylight savings time issue with analytics



Hi ,
before defect was opened regarding chile DateTime (America/Santiago)

the problem now back and it happen when the date in 13 or 14 August , this date they change they dateTime .
i tried to send the time 2016-08-14T03:00:00Z also tried 2016-08-14T04:00:00Z and also2016-08-14T02:00:00Z
all the tim it failed .

@majoritasdev ,

Thanks in advance.


is there someone who can help with the issue ?


Hi, @Asad.

Could you please provide the full response and request? With this information, we’ll be better able to help you. We recommend you use twurl.


Hi @juanshishido ,
thanks for you reply,

twurl -t -H ‘/1/stats/accounts/18ce53x6d8b?entity=ACCOUNT&start_time=2016-08-14T00:00:00-04:00Z&end_time=2016-08-18T00:00:00-04:00Z&granularity=DAY&metric_groups=BILLING,ENGAGEMENT&placement=ALL_ON_TWITTER’

even if i tried with start_time=2016-08-14T00:00:00-03:00Z also ,
so the problem only on 14/8 always fail whatever start_time you send (also if 14 equal to end_time)
i think that this bug in your side , because the postman also failed on this period .
i know that on this data chile changed they timezone to 14/8 00:00 changed to 23:00
so maybe this cause the problem .
but it should be fix for the 14/8.


@Asad: Thanks for providing that additional information. It is quite helpful! We’re looking into this now and will get back to you as soon as we know more.


Hi, @Asad. Thanks for being patient while we looked into this.

For reference (especially for others who might come across this post in the future), this daylight savings time (DST) info for Santiago is useful. The standard offset for Chile is 04:00:00Z. During DST, this changes to 03:00:00Z. In 2016, DST ended on 2016-05-15. It started again on 2016-08-14, as you mentioned.

You are correct that the INVALID_TIME_WINDOW error is returned for any offset for 2016-08-14. For the time being, you can use the following workaround:

$ twurl -H "/1/stats/accounts/18ce53x6d8b?entity=ACCOUNT&start_time=2016-08-14T04:00:00Z&end_time=2016-08-15T03:00:00Z&granularity=HOUR&metric_groups=BILLING,ENGAGEMENT&placement=ALL_ON_TWITTER" | jq .

Here, we use hour granularity. Because clocks turn forward at midnight, the first hour of 2016-08-14 is actually 1:00AM (local). So, we use the 04:00:00Z start time offset. For the end time, we use the 03:00:00Z offset. This correctly returns time_series_length of 23. Then, you can sum the arrays for the particular metrics you’re interested in.

We appreciate you letting us know about this issue. We’ll work on getting this fixed, but do not currently have a timeframe. Apologies for the inconvenience.

Expected start_time to be precisely aligned at midnight in timezone America\/Santiago for granularity Some(DAY), got \"2016-05-15T03:00:00Z\" for