thibaultspriet / SyncNotionCalendar

Automate synchronization between Notion databases and Apple Calendar
139 stars 18 forks source link

Apple Calendar and Notion Do Not sync properly #9

Closed u912x closed 2 years ago

jkhnfk commented 2 years ago

同问。同步过来的时间不正确。😳😳😳😳 Ask the same question. The synchronization time is incorrect.

u912x commented 2 years ago

同问。同步过来的时间不正确。😳😳😳😳 Ask the same question. The synchronization time is incorrect.

Hi. This solution worked for me.

Open CalendarClient.py and change the start and end date formats to match < year , day, month > instead of <y,m,d>

screen shot

And second to be sure, make sure your notion calendar format matches as shown in screen shot.

screen shot 2

Hope is helps.

jkhnfk commented 2 years ago

在您的指引下对代码进行了调整,将 CalendarClient.py 中第32行、第43行中的y,m,d改成了y,d,m。然后就正确了。 谢谢。 Under your guidance, the code has been adjusted and changed to CalendarClient.py y,m,d in lines 32 and 43 to y,d,m. Then it's right. thank you.

jkhnfk commented 2 years ago

再次请教,我同步一个之前的database,里面有182条项目,然后运行时报错,
another consult, I synchronize a previous database with 182 items, and then run it with errors:

self.add_events(id_news,current=live) File "/Users/jkhnfk/Script/SyncNotionCalendar/src/Database.py", line 210, in add_events raise Exception(e) Exception: too many values to unpack (expected 3)

是否有办法解决?谢谢您。 Is there a solution? Thank you very much.

thibaultspriet commented 2 years ago

Hi @jkhnfk & @u912x,

I fixed the date format error.

@jkhnfk for your second error I will open a new issue.