Skip to main content

Setting date+time value loses time zone

  • September 22, 2019
  • 3 replies
  • 3479 views

I’m using the following mutation to create and item and set a due date column’s date & time:

mutation {
create_item(board_id: 329635761, group_id: “Today”, item_name: “new item 1234”, column_values: “{"date48": {"date": "2019-05-03", "time": "11:25:00"}}”) {
id
}
}

Everything works fine, except that when I go to the data in Monday, the time has shifted too UTC. For example, the 11:25:00 above shows up in Monday as being due 06:25:00. My timezone in my Monday settings is for GMT-6. So, 06:25:00 would be the correct time in GMT (as adjusted for daylights savings time). Any idea why this is happening? I want the time in the due date column to show in my local time zone.

This topic has been closed for replies.

3 replies

dipro
Forum|alt.badge.img
  • Leader
  • September 23, 2019

Hey @magnum6 – good catch! Just to clarify, are you looking to add time via the API in UTC or your local timezone?

I think I know what’s happening here – the Due Date column shows times in a local timezone, but our server takes values in UTC. Therefore, if you add 11:25 via the API it will appear as 06:25 when you open the platform.

I’ll pass on a request to the team to add this to the documentation, as this is certainly confusing. Thanks for sending this to us 🙂

Cheers,
Dipro


  • Author
  • New Participant
  • September 23, 2019

Tracking. Thanks for the clarification. I was adding time in my local timezone - assuming the input would be read according to my default time zone in preferences. I can adjust the input to UTC.


dipro
Forum|alt.badge.img
  • Leader
  • October 3, 2019

No problem 🙂 Happy to help.