mirror of
https://github.com/b4tman/sync_ics2gcal
synced 2025-07-23 05:13:29 +00:00
lint ical
This commit is contained in:
@@ -17,7 +17,10 @@ def format_datetime_utc(value):
|
|||||||
value = datetime.datetime(
|
value = datetime.datetime(
|
||||||
value.year, value.month, value.day, tzinfo=utc)
|
value.year, value.month, value.day, tzinfo=utc)
|
||||||
value = value.replace(microsecond=1)
|
value = value.replace(microsecond=1)
|
||||||
return utc.normalize(value.astimezone(utc)).replace(tzinfo=None).isoformat() + 'Z'
|
|
||||||
|
return utc.normalize(
|
||||||
|
value.astimezone(utc)
|
||||||
|
).replace(tzinfo=None).isoformat() + 'Z'
|
||||||
|
|
||||||
|
|
||||||
def gcal_date_or_dateTime(value, check_value=None):
|
def gcal_date_or_dateTime(value, check_value=None):
|
||||||
@@ -145,7 +148,9 @@ class EventConverter(Event):
|
|||||||
self._put_to_gcal(
|
self._put_to_gcal(
|
||||||
event, 'updated', self._datetime_str_prop, 'LAST-MODIFIED')
|
event, 'updated', self._datetime_str_prop, 'LAST-MODIFIED')
|
||||||
self._put_to_gcal(
|
self._put_to_gcal(
|
||||||
event, 'transparency', lambda prop: self._str_prop(prop).lower(), 'TRANSP')
|
event,
|
||||||
|
'transparency',
|
||||||
|
lambda prop: self._str_prop(prop).lower(), 'TRANSP')
|
||||||
|
|
||||||
return event
|
return event
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user