kopia lustrzana https://github.com/collective/icalendar
utcoffset respects the given date. this is a problem when creating a datetime which is normaltime and currently there is daylight saving time. to fix this we should use the actual date to determine utcoffset.
rodzic
6696065a44
commit
7967e02608
|
@ -309,7 +309,7 @@ class vDatetime:
|
|||
|
||||
def ical(self):
|
||||
if self.dt.tzinfo:
|
||||
utc_time = self.dt - self.dt.tzinfo.utcoffset(datetime.now())
|
||||
utc_time = self.dt - self.dt.tzinfo.utcoffset(self.dt)
|
||||
return utc_time.strftime("%Y%m%dT%H%M%SZ")
|
||||
return self.dt.strftime("%Y%m%dT%H%M%S")
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue