dagraham / etm-tk

event and task manager
https://pypi.org/project/etmtk/
67 stars 13 forks source link

iCalendar export lacks DTSTAMP field and VTIMEZONE entry #69

Closed cipharius closed 4 years ago

cipharius commented 4 years ago

I ran into issue, where my web calendar (SOGo Calendar) wouldn't interpret timezone information attached to the exported VEVENTS.

After running the etm generated ics file through iCalendar validator two issues were detected: undefined timezone identifiers and missing DTSTAMP fields.

Manually adding VTIMEZONE definition fixed the issue with my web calendar not interpreting the DateTimes correctly.

Although my particular issue wasn't due to missing DTSTAMP, it still might be a good idea to define it as it's a mandatory VEVENT field.

Edit: (this edit now seems irrelevant compared to edit2) After checking out how SOGo acquires VTIMEZONE definitions, I found a file with instructions on how standard timezone definitions can be converted to iCal compatible format.

Edit2: After some research on how currently etm iCal export works, I found a compatible potential solution for generating VTIMEZONE entries.

dagraham commented 4 years ago

Thanks for your feedback. A starting time, and thus a dtstamp, is required for some etm items but not for all. For example, events require a starting time but tasks do not. What type of item did your validator flag for a missing DTSTAMP field?

-- Dan On Sep 30, 2019, 2:10 AM -0400, Valts Liepiņš notifications@github.com, wrote:

I ran into issue, where my web calendar (SOGo Calendar) wouldn't interpret timezone information attached to the exported VEVENTS.

After running the etm generated ics file through iCalendar validatorhttps://urldefense.proofpoint.com/v2/url?u=https-3A__icalendar.org_validator.html&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=cjSGCFDvj7Zy-plAeyNJjDIBRBeNSNbZaJLNyuBRtxo&m=WTaWSERNTqQSIyOBdTwL5jXVe_ChMVzBDor4GWXosss&s=wVn4k57BQUym1ctEx3nuJSxLWqBts3CMb5q65tGoW7Q&e= two issues were detected: undefined timezone identifiers and missing DTSTAMP fields.

Manually adding VTIMEZONE definition fixed the issue with my web calendar not interpreting the DateTimes correctly.

Although my particular issue wasn't due to missing DTSTAMP, it still might be a good idea to define it as it's a mandatory VEVENT field.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dagraham_etm-2Dtk_issues_69-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAAH4HJ5KP77ALIWRCI4PKGLQMGJ5BA5CNFSM4I3WO7DKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HOOPGHA&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=cjSGCFDvj7Zy-plAeyNJjDIBRBeNSNbZaJLNyuBRtxo&m=WTaWSERNTqQSIyOBdTwL5jXVe_ChMVzBDor4GWXosss&s=F7kowJtkdNeLwgy0qpsoxrV1SIcN3gu8x6jXJoNqeJE&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAH4HJ3LOJL366JSMK64LM3QMGJ5BANCNFSM4I3WO7DA&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=cjSGCFDvj7Zy-plAeyNJjDIBRBeNSNbZaJLNyuBRtxo&m=WTaWSERNTqQSIyOBdTwL5jXVe_ChMVzBDor4GWXosss&s=6hys1gf9T27ySKMGzFYsFLb8APGSWNh8g3RmfPDvF0A&e=.

cipharius commented 4 years ago

All the VEVENTS I had in the file were for events, so with both DTSTART and DTEND.

I have not studied iCalendar specification, so I am not aware what DTSTAMP is required for, my main issue is with VTIMEZONE definition.

dagraham commented 4 years ago

Out of curiosity, what is your timezone?

-- Dan On Sep 30, 2019, 8:52 AM -0400, Valts Liepiņš notifications@github.com, wrote:

All the VEVENTS I had in the file were for events, so with both DTSTART and DTEND.

I have not studied iCalendar specification, so I am not aware what DTSTAMP is required for, my main issue is with VTIMEZONE definition.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dagraham_etm-2Dtk_issues_69-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAAH4HJYBGW5ZVSDMK3GA57DQMHY77A5CNFSM4I3WO7DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD75Q4SQ-23issuecomment-2D536546890&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=cjSGCFDvj7Zy-plAeyNJjDIBRBeNSNbZaJLNyuBRtxo&m=FQsMtj_oWyxZq1lwmrq-MJwoIrm_Aih7F_q_jE_JaGI&s=qjsEjI5EN4mGkhix1ZpDZTUpqzIPhFcIfStlsYu9NpQ&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAH4HJ55RFBEEZCMQOUHBYTQMHY77ANCNFSM4I3WO7DA&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=cjSGCFDvj7Zy-plAeyNJjDIBRBeNSNbZaJLNyuBRtxo&m=FQsMtj_oWyxZq1lwmrq-MJwoIrm_Aih7F_q_jE_JaGI&s=w-8fJ8cIHDmGIgXyxOMmH_zldWZEYXM4JETnNWxvWfI&e=.

cipharius commented 4 years ago

My timezone is Europe/Riga and I have explicitly set it as local_timezone in configuration.

Strangely enough, when I manually import the etm ics in SOGo web calendar, it displays events 3 hours later, while when the ics file is synced using vdirsyncer, the same web calendar show that events are 3 hours earlier.

Also I noticed that when I sync the etm generated ics file (from icssync_folder) with my calendar server using vdirsyncer, it deletes and recreates all events, even when they weren't changed.