API Timezone Issues

So hoping to get a response from AC API developers here on something going on. So using the API to read contact data, and in the ‘lots of timestamps’ section, I’m seeing data that looks like this:

    [cdate] => 2023-03-13T12:09:37-05:00
    [adate] => 2023-03-13T14:41:04-05:00
    [udate] => 2023-03-13T14:41:40-05:00
    [edate] => 2023-03-13T13:25:14-05:00
    [deleted_at] => 
    [created_utc_timestamp] => 2023-03-13 12:09:37
    [updated_utc_timestamp] => 2023-03-13 14:41:40
    [created_timestamp] => 2023-03-13 12:09:37
    [updated_timestamp] => 2023-03-13 14:41:40

So there’s … more than a few issues here:

  1. There’s an obvious problem, that the ‘utc’ timestamps that are being provided, are, in fact, not in UTC. They are actually matching the ‘-05:00’ numbers in the short elements (cdate, udate, etc). This would 100% appear to be a bug.
  2. I understand now that the reason the base dates are coming back as ‘-05:00’ is because it’s how we have the account configured. It’s set to “US/NY”. But is there no way to get the API to just always talk UTC while having the UX use another timezone? I’d love to switch the account over to UTC, but I don’t want the marketing staff here to need to think about that. They should be able to schedule campaigns/etc in US/NY, but the underlying API talk in UTC.
  3. Also: You can’t even set UTC? It’s not an option. Sure you could use Europe/London. But that includes daylight savings rules. Not a pure universal time like UTC. Why isn’t that an option?
  4. Also, there’s another problem/bug here. You’ll note those above values, look like this: 2023-03-13T14:41:04-05:00 … That’s fine, and accurate, except, I made that change before pulling it down from the API, at 3:41pm (15:41), not 14:41. But there’s the rub, it’s saying it was made at 14:41-05, but daylight savings just started here, so the change was actually made at 15:41-04 — While that has the same underlying value. The problem here is that since things like the ‘updated_after’ filter appear to want to talk in the same timezone as your account. It’s currently speaking wrong by an hour. So if make a change at 15:31 today and ask the API for all contacts updated_after: 2023-03-13 15:30:00 … it would not show up. I’d have to instead ask for 14:30:00 to receive it, which no code would end up doing even if going off proper local timezone.
2 Likes