From 2e85daa031d5556ac33a9dc8ae30e388c20f9d47 Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Thu, 25 Dec 2025 08:57:49 +0000 Subject: [PATCH] Fix time zone info --- hackertours.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hackertours.py b/hackertours.py index 6168d86..3a18ef9 100644 --- a/hackertours.py +++ b/hackertours.py @@ -4,6 +4,7 @@ Creates a schedule.json from the Hackertours planning Excel. import math import sys from datetime import datetime, timedelta, timezone +from zoneinfo import ZoneInfo import pandas import pytz @@ -16,6 +17,8 @@ from voc.schedule import Schedule, Event def create_schedule(sheet_file: str, schedule_file: str): # global voc.tools.VERSION voc.tools.VERSION = "0.0.1" + TZNAME = "Europe/Amsterdam" + tzinfo = ZoneInfo(TZNAME) planning_df = pandas.read_excel(sheet_file, sheet_name="Tours") description_df = pandas.read_excel(sheet_file, sheet_name="Descriptions") @@ -27,7 +30,7 @@ def create_schedule(sheet_file: str, schedule_file: str): d[k] = description_df[k][index] descriptions[d['Name']] = d - start = datetime(year=2025, month=12, day=26, tzinfo=pytz.timezone('Europe/Berlin')) + start = datetime(year=2025, month=12, day=26, tzinfo=tzinfo) acronym = "ht" duration = 4 @@ -38,7 +41,7 @@ def create_schedule(sheet_file: str, schedule_file: str): month=12, day=26, days_count=5, - tz="Europe/Berlin") + tz=TZNAME) # schedule.schedule().version = '1.0' schedule["conference"]["rooms"] = [{ "name": "Hackertours",