How add-rows API deals timezone for datetime fields

Hello guys,

I have a question for using the AppSheet API to add rows having datetime fields by input strings containing timezone (formatted like ISO 8601). It seems the API does parse the input string property as a datetime, but then it stores the datetime value without the timezone. The timezone property specified in the API request seems to be ignored and won’t work as expected. The datetime value is eventually stored in UTC timezone which is not good to show in a non-UTC timezone area (i.e. most of the world).

For example, I have a record containing a datetime field with a ISO8601-encoded string as below:

{ id: "foo", …, created_at: "2020-07-06T21:40:03+09:00" }

This record will be stored in the sheet as below

| id | … | created_at |
|-|-|-|
|foo| … | 2020/07/06 12:40:03 |

Here, it’s good to see the ISO8601 formatted string parsed as a datetime value property (in UTC); however, the result (“2020/07/06 12:40:03”) gets stripped of the timezone info.

I suppose the API will convert the datetime to the right format by given properties of “Locale” and “Timezone”, but it doesn’t, so I’d like to make it sure.

As a workaround, I can tweak my server to pass pre-converted strings of datetime values, but it’s nice to have a much “lower” solution on it.

Thanks,

References:

1 Like

So you want to see it or to be recorded as 2020/07/06 12:40:03+00:00 to your back-end?

Yes, that would be better.

And if there is a timezone set to other than UTC like 2020/07/06 21:40:03+09:00, it would be much better.