Closed lastorel closed 2 years ago
Notion API always returns time in format 2021-11-23T18:57:00.000Z
. UTC.
This string converts in 2021-11-23T18:57:00.000+00:00
and Models have UTC time. You can use .astimezone()
to convert this time to your local system time.
When you create or update something, ex. PropertyValue(type_="date", value=datetime.datetime.now())
, your timezone will be added automatically. Thus Notion receives correct time value.
This example
{'date': {'start': '2021-11-24T00:20:42.171423', 'end': None}}
will be accepted like UTC time. Notion showsToday 00:20 (UTC)
Well it is not correct time for my timezone in reality. Yeah, I can to modify timezone in "Date format..." in Notion, but this is not the automation.Let's try to push to API other representations of date.