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
I found a server ( https://www.officeholidays.com/ics/germany/) that returns calendar entries with timestamps like this:
20210402T63058Z Obviously this is not a valid DATE-TIME. IMHO this is meant to be 20210402T063058Z (Note the 0 after the T for 2 digit hour)
Please consider autocorrecting this, e.g. with the patch below:
--- icalendar.py.orig 2021-04-02 14:07:52.618401523 +0200
+++ icalendar.py 2021-04-02 14:09:18.279702313 +0200
@@ -1727,6 +1727,10 @@
"""
Returns datetime.datetime object.
"""
+ t=s[9:]
+ # assume the missing digit is a 0 in front of the hour
+ if len(t.split('Z')[0]) < 6:
+ s = s[:9] + '0' + t
try:
year = int(s[0:4])
month = int(s[4:6])
The text was updated successfully, but these errors were encountered:
@dorchain, I had a quick look at the latest file from this site, and it appears that they have fixed this problem (although all the timestamps are now either midnight or 080000, so it might be a workaround).
Given that this was clearly a bug on their part, and it's now fixed, I think it's best not to clutter the code with this (now not needed) workaround.
Apologies for the delay in responding, and thanks for the report, nonetheless.
Hi,
I found a server ( https://www.officeholidays.com/ics/germany/) that returns calendar entries with timestamps like this:
20210402T63058Z Obviously this is not a valid DATE-TIME. IMHO this is meant to be 20210402T063058Z (Note the 0 after the T for 2 digit hour)
Please consider autocorrecting this, e.g. with the patch below:
The text was updated successfully, but these errors were encountered: