You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello again! These two bugs are related and I saw them after this issue was solved:
Bug 1
When I try to update a date with:
anyquery -q "UPDATE notion_database SET \`Review Date\` = '2024-12-17' WHERE _page_id = '15776305-7c51-80db-ada0-f8cb0daa92cb';"
or with:
anyquery -q "UPDATE notion_database SET \`Review Date\` = '17/12/2024' WHERE _page_id = '15776305-7c51-80db-ada0-f8cb0daa92cb';"
Then, on the Notion UI I see that the "Include Time" flag set to true, and the time is 00:00:00 in the UTC timezone.
The expected result is that the new value for Review Date should be just a date with no time specified ("Include Time" set to false).
(PS: When I update a date with either YYY-MM-DDTHH:MM:SSZ or with YYYY-MM-DDTHH:MM:SSZ/YYYY-MM-DDTHH:MM:SSZ (with Z being any offset) the date time is saved correctly).
Bug 2
Moreover, let's say that in my table I have more fields that are also date fields, and each of these fields contain a date (or two dates with or without time) So, if I want to modify the Title field of the row, and I run this:
anyquery -q "UPDATE notion_database SET \`Title\` = 'New Name' WHERE \`_page_id\` = '15776305-7c51-80db-ada0-f8cb0daa92cb';"
Then, all date fields are ALSO modified like this:
If the field had the "Include Time" flag set to false, it is now set to true and, the time is 00:00:00 in the UTC timezone.
If the field had the "Include Time" flag set to true and the time zone was Z, then the field stays as is.
If the field had the "Include Time" flag set to true and the time zone was not Z, then the field is still shown with the correct offset, but the time zone id is gone (from the UI).
The expected result is that any field that I'm not explicitly modifying in the UPDATE command should stay as it is.
The text was updated successfully, but these errors were encountered:
Hello @gigena-git,
Thank you for opening an issue.
About the first bug, it's a known issue with the third-party library I'm using to connect to the Notion API jomei/notionapi#177. I can try to push for a pull request, but I can't guarantee anything.
About the second bug, I've fixed it in abbb833 and 527d410. It'll be available in the next anyquery version. I'll ping you when the version is released.
Hello again! These two bugs are related and I saw them after this issue was solved:
Bug 1
When I try to update a date with:
anyquery -q "UPDATE notion_database SET \`Review Date\` = '2024-12-17' WHERE _page_id = '15776305-7c51-80db-ada0-f8cb0daa92cb';"
or with:
anyquery -q "UPDATE notion_database SET \`Review Date\` = '17/12/2024' WHERE _page_id = '15776305-7c51-80db-ada0-f8cb0daa92cb';"
Then, on the Notion UI I see that the "Include Time" flag set to true, and the time is
00:00:00
in the UTC timezone.The expected result is that the new value for
Review Date
should be just a date with no time specified ("Include Time" set to false).(PS: When I update a date with either
YYY-MM-DDTHH:MM:SSZ
or withYYYY-MM-DDTHH:MM:SSZ/YYYY-MM-DDTHH:MM:SSZ
(withZ
being any offset) the date time is saved correctly).Bug 2
Moreover, let's say that in my table I have more fields that are also date fields, and each of these fields contain a date (or two dates with or without time) So, if I want to modify the
Title
field of the row, and I run this:anyquery -q "UPDATE notion_database SET \`Title\` = 'New Name' WHERE \`_page_id\` = '15776305-7c51-80db-ada0-f8cb0daa92cb';"
Then, all date fields are ALSO modified like this:
00:00:00
in the UTC timezone.Z
, then the field stays as is.Z
, then the field is still shown with the correct offset, but the time zone id is gone (from the UI).The expected result is that any field that I'm not explicitly modifying in the
UPDATE
command should stay as it is.The text was updated successfully, but these errors were encountered: