debug
This commit is contained in:
@@ -163,7 +163,7 @@ class cls_caldav():
|
|||||||
|
|
||||||
def convert_to_gmt1(self, dt):
|
def convert_to_gmt1(self, dt):
|
||||||
gmt1_tz = pytz.timezone('Europe/Paris')
|
gmt1_tz = pytz.timezone('Europe/Paris')
|
||||||
if dt.tzinfo is not None:
|
if hasattr(dt,"tzinfo") and dt.tzinfo is not None:
|
||||||
# Convertir l'objet datetime en GMT+1
|
# Convertir l'objet datetime en GMT+1
|
||||||
# Utilisez le nom de votre fuseau horaire GMT+1
|
# Utilisez le nom de votre fuseau horaire GMT+1
|
||||||
dt_gmt1 = dt.astimezone(gmt1_tz)
|
dt_gmt1 = dt.astimezone(gmt1_tz)
|
||||||
@@ -269,7 +269,7 @@ class cls_caldav_client():
|
|||||||
|
|
||||||
def init_caldav(self, caldav_url, caldav_user, caldav_password):
|
def init_caldav(self, caldav_url, caldav_user, caldav_password):
|
||||||
client = caldav.DAVClient(url=caldav_url, username=caldav_user, password=caldav_password)
|
client = caldav.DAVClient(url=caldav_url, username=caldav_user, password=caldav_password)
|
||||||
self.data = self.client.principal()
|
self.data = client.principal()
|
||||||
|
|
||||||
for cal in self.data.calendars():
|
for cal in self.data.calendars():
|
||||||
print(f"name: {cal.name}({cal.url})")
|
print(f"name: {cal.name}({cal.url})")
|
||||||
|
Reference in New Issue
Block a user