Fix time zone info
This commit is contained in:
parent
df1e89f595
commit
2e85daa031
1 changed files with 5 additions and 2 deletions
|
|
@ -4,6 +4,7 @@ Creates a schedule.json from the Hackertours planning Excel.
|
||||||
import math
|
import math
|
||||||
import sys
|
import sys
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
|
from zoneinfo import ZoneInfo
|
||||||
|
|
||||||
import pandas
|
import pandas
|
||||||
import pytz
|
import pytz
|
||||||
|
|
@ -16,6 +17,8 @@ from voc.schedule import Schedule, Event
|
||||||
def create_schedule(sheet_file: str, schedule_file: str):
|
def create_schedule(sheet_file: str, schedule_file: str):
|
||||||
# global voc.tools.VERSION
|
# global voc.tools.VERSION
|
||||||
voc.tools.VERSION = "0.0.1"
|
voc.tools.VERSION = "0.0.1"
|
||||||
|
TZNAME = "Europe/Amsterdam"
|
||||||
|
tzinfo = ZoneInfo(TZNAME)
|
||||||
|
|
||||||
planning_df = pandas.read_excel(sheet_file, sheet_name="Tours")
|
planning_df = pandas.read_excel(sheet_file, sheet_name="Tours")
|
||||||
description_df = pandas.read_excel(sheet_file, sheet_name="Descriptions")
|
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]
|
d[k] = description_df[k][index]
|
||||||
descriptions[d['Name']] = d
|
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"
|
acronym = "ht"
|
||||||
duration = 4
|
duration = 4
|
||||||
|
|
||||||
|
|
@ -38,7 +41,7 @@ def create_schedule(sheet_file: str, schedule_file: str):
|
||||||
month=12,
|
month=12,
|
||||||
day=26,
|
day=26,
|
||||||
days_count=5,
|
days_count=5,
|
||||||
tz="Europe/Berlin")
|
tz=TZNAME)
|
||||||
# schedule.schedule().version = '1.0'
|
# schedule.schedule().version = '1.0'
|
||||||
schedule["conference"]["rooms"] = [{
|
schedule["conference"]["rooms"] = [{
|
||||||
"name": "Hackertours",
|
"name": "Hackertours",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue