We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c5253e commit bcfb086Copy full SHA for bcfb086
packages/notion-utils/src/format-notion-date-time.ts
@@ -8,8 +8,9 @@ export interface NotionDateTime {
8
}
9
10
export const formatNotionDateTime = (datetime: NotionDateTime) => {
11
- const dateString = `${datetime.start_time || ''} ${datetime.start_date} ${
12
- datetime.time_zone || ''
13
- }`
+ // Adding +00:00 preserve the time in UTC.
+ const dateString = `${datetime.start_date}T${
+ datetime.start_time || '00:00'
14
+ }+00:00`
15
return formatDate(dateString)
16
0 commit comments