Any news @juanshishido?
The problem got even worse now.
Brazilian´s DST time has changed recently to start on November 4th and Twitter is demanding now to receive end_time in DST right now. I believe Twitter is considering the start of Brazilian´s DST on October 20th.
This makes the API completely buggy to query results in present time.
Don´t you guys consider this extremely high priority?

1 Like


This picture from my profile shows how the whole Twitter platform is not adapted to the new Brazilian DST times. 30 of October is still NOT DST here. The time presented should be (GMT-03:00) Brasilia and not (GMT-02:00) Brasilia.

Hi @juanshishido, I’d like to point out that the bug happens also with unspecified timezone, not only with clashing schemas. I understand that DST exceptions are a complicated issue, so do you possibly have plans on keeping your timezone schema up to date, with the help of some dedicated third party resource?

Hello @juanshishido,
Do we have any update on that? 3 and half years and that is still an issue.
Brazil has no daylight savings any more and the api is not accepting a request with the right time (DST-3):


twurl -H ads-api.twitter.com "/5/stats/jobs/accounts/p0ro57?start_time=2020-01-05T00:00:00-0300&end_time=2020-01-10T00:00:00-0300&entity=CAMPAIGN&entity_ids=cdjo4,chi07&granularity=DAY&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER" -X POST | python -m json.tool

Result:

{
    "errors": [
        {
            "code": "INVALID_TIME_WINDOW",
            "message": "Expect time to be midnight in the account's local timezone for day granularity",
            "parameter": ""
        },
        {
            "code": "INVALID_TIME_WINDOW",
            "message": "Expect time to be midnight in the account's local timezone for day granularity",
            "parameter": ""
        }
    ],
    "request": {
        "params": {
            "start_time": "2020-01-05T03:00:00Z",
            "entity_ids": [
                "cdjo4",
                "chi07"
            ],
            "end_time": "2020-01-10T03:00:00Z",
            "placement": "ALL_ON_TWITTER",
            "account_id": "p0ro57",
            "granularity": "DAY",
            "entity": "CAMPAIGN",
            "metric_groups": [
                "ENGAGEMENT"
            ]
        }
    }
}

Meanwhile, if we send a request with the WRONG timezone (DST-2), it works:


twurl -H ads-api.twitter.com "/5/stats/jobs/accounts/p0ro57?start_time=2020-01-05T00:00:00-0200&end_time=2020-01-10T00:00:00-0200&entity=CAMPAIGN&entity_ids=cdjo4,chi07&granularity=DAY&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER" -X POST | python -m json.tool
1 Like

We have been getting the error too with newer versions of timezonedb (2019.2 and 2019.3). Similar to what @controledash described, an outdated version (2018.9) of timezonedb does seem to align with Twitter API regarding some timezones.

@juanshishido could you please take this issue forward? Our advice would be to:

  • Update the timezone configuration. Brazil no longer has DST so updating now should sustain for a relatively long time. (Last year there was only three updates (compare w/ 9 updates in 2018))
  • Find a way to keep the timezone config updated
  • Expose your timezonedb version somewhere (like the error message?), if you’re using timezonedb. That would help us align our product with yours.

Looking forward to your reply!

Ville from Supermetrics

Hi @juanshishido,

Would it be possible to get some kind of response to the above suggestion we made? We did go through the process to update our timezonedb, but there still seems to be an issue with what we get from Twitter that leads to this error.

Our Brazilian clients have been unable to get data for 5 months now due to this issue, and we would like to know if there are plans to correct this on Twitters side or make it easier for us to align.

Thank you!

Jessica
Supermetrics Connectors PM

@Supermetrics, @controledash, @pabloeemos: Thanks, all, for the engagement on this thread. We appreciate your time and suggestions. We are trying to get this prioritized. Apologies for the significant delay.

We have made some progress.

The latest request example in this thread, which requests data starting on 2020-01-05 and ending on 2020-01-10, after DST was cancelled in Brazil, is now successful. (I’ve removed the metrics fields from the response for readability—they have been replaced by elipses.)

$ twurl -H ads-api.twitter.com "/7/stats/accounts/p0ro57?start_time=2020-01-05T00:00:00-0300&end_time=2020-01-10T00:00:00-0300&entity=CAMPAIGN&entity_ids=cdjo4,chi07&granularity=DAY&metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER"
{
  "data_type": "stats",
  "time_series_length": 5,
  "data": [
    {
      "id": "cdjo4",
      "id_data": [
        {
          "segment": null,
          "metrics": {
            ...
          }
        }
      ]
    },
    {
      "id": "chi07",
      "id_data": [
        {
          "segment": null,
          "metrics": {
            ...
          }
        }
      ]
    }
  ],
  "request": {
    "params": {
      "start_time": "2020-01-05T03:00:00Z",
      "segmentation_type": null,
      "entity_ids": [
        "cdjo4",
        "chi07"
      ],
      "end_time": "2020-01-10T03:00:00Z",
      "country": null,
      "placement": "ALL_ON_TWITTER",
      "granularity": "DAY",
      "entity": "CAMPAIGN",
      "platform": null,
      "metric_groups": [
        "ENGAGEMENT"
      ]
    }
  }
}

However, requests that happened while DST was in effect are still failing. We will continue looking into this.

Thanks again!

1 Like

Super, glad to hear this is progressing! Thank you for the update!