I have a board where I’ve set the Date/Time value to Oct 28, 09:00 AM
My profile timezone is +01:00 Vienna
The API is returning 2023-10-28 15:00
Can someone explain the conversions that are happening? I can’t understand why it shifted the time by +6.
All times are stored in UTC. See below. The value property returns the time in UTC, however the text property returns the time as it is visible on the board.
Hi @basdebruin ,
I am somewhat confused.
This is how the value is displayed on my board:
This is how the API returns it:
Text > 2023-10-28 15:00 is not how it is displayed on my board, is it?
Value > 2023-10-28 13:00 is the time in UTC? My profile timezone is GMT+01. How was 09:00 in the UI converted to 13:00?
I tested changing the timezone in my profile, but it did not change the value in the UI, or the value in the “value” field, but it does change the value returned in “text” and “time”.
What is the TZ of the user that is part of the token you use?
The time zone in the profile? It is GMT +01 Vienna. I am using the token in Developer > My access tokens.
Looks like the token refers to a user that has (or had??) it’s TZ set to CET+6
Very strange, like I mentioned:
I tested changing the timezone in my profile, but it did not change the value in the UI, or the value in the “value” field, but it does change the value returned in “text” and “time”. No idea why it is only partially? storing previous time zone information, or maybe I need to reset the instance somehow to update the UI.
Changing your TZ in monday should change your board, did you refresh your board?
I did, even restarted my browser. Changing timezone does not seem to affect the date/hour set in Date type columns in the UI, but it does change the values returned from querying the API. Does it update Date type columns for you?
I just tested this and changing the TZ in monday does NOT change the column value on your board (I can’t remember if this was the case a while ago). The value property (in CET) remains unchanged (as it should) and the text property shows the time in the changed TZ. So, now the text property does not give you what the user sees. I think this is a monday bug introduced not too long ago.
I see, thank you for testing and confirming.
Just to confirm:
The value property (in CET)
By CET you mean Central European Time? The value is not in UTC?
oops… I meant UTC
To me the bug is that the board contents is not updated after changing the TZ, not even after a refresh or login / logout. The API response seems to be ok to me.
Thank you @basdebruin !!!
I thought of another related question, and I hope you could help.
When a hour is not specified for a Date type column, the API only returns a date.
Should this be considered as being in UTC? Like 2023-11-16T00:00:00Z? Not sure if people can have the displayed date in the user-interface change based on their timezone when an hour is not specified (Changing timezone doesn’t seem to change anything, but this was an UI bug, so just wanted to confirm if possible.)
In general (what it used to be ) the value return always in UTC (also for dates without time - @midnight UTC). The text was always returning in timezone from user’s profile. Let’s see if monday will fix the UI (I am in contact with them and they can reproduce)
Alright, so I actually had quite a bit of back-&-forth on this issue recently, so happy to shed some additional light on all of this!
The time within the Data column is directly related to your device settings & NOT your Monday profile. You can test this by manually setting your PC time zone to be different & you’ll see all the board times change on refresh.
Automations; however, ARE based off of your Monday profile. They’re also based off the user who set up the automation. We ran into a problem where I set up some automations (I’m GMT -5) & our users on GMT+0 were getting notifications showing my local time & not theirs.
Lastly, it’s worth noting that the time zone options within Monday are labeled in such a way that you should always base it on location, not current GMT-related time zone. E.g. The time zone for (GMT -05:00) Eastern Time (US & Canada) always shows GMT -5, even when locally we’re on Daylight Savings Time & actually at GMT -4.