I'm currently trying to convert a calendar and one event has negative values in start_at and end_at.
That breaks the program. Probably should be checked for before using the values.
File "C:\Users\_\AppData\Roaming\Python\Python312\Scripts\timetree-exporter.exe\__main__.py", line 4, in <module>
File "C:\Users\_\AppData\Roaming\Python\Python312\site-packages\timetree_exporter\__main__.py", line 54, in <module>
iCalEvent = formatter.to_ical()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\_\AppData\Roaming\Python\Python312\site-packages\timetree_exporter\formatter.py", line 147, in to_ical
event.add("dtstart", self.dtstart)
^^^^^^^^^^^^
File "C:\Users\_\AppData\Roaming\Python\Python312\site-packages\timetree_exporter\formatter.py", line 107, in dtstart
return self.get_datetime(is_start_time=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\_\AppData\Roaming\Python\Python312\site-packages\timetree_exporter\formatter.py", line 92, in get_datetime
datetime.fromtimestamp(
OSError: [Errno 22] Invalid argument
{
"category": 1,
"type": 1,
"author_type": "User",
"title": "",
"all_day": true,
"start_at": -284169600000,
"start_timezone": "UTC",
"end_at": -284169600000,
"end_timezone": "UTC",
"label_id": 1,
"recurrences": ["RRULE:FREQ=YEARLY"],
"alerts": [],
"attachment": {},
"like_count": 0,
"files": [],
}
If you want, I can do pr for this.