Fix time zone info

This commit is contained in:
Stefan Bethke 2025-12-25 08:57:49 +00:00
commit 2e85daa031

View file

@ -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",