service: isort && black

This commit is contained in:
Franzi 2024-01-16 08:50:09 +01:00
parent e2d154226f
commit 60cd315f0b

16
service
View file

@ -140,15 +140,23 @@ def main():
for day in raw_schedule["conference"]["days"]: for day in raw_schedule["conference"]["days"]:
for room in day["rooms"].values(): for room in day["rooms"].values():
for talk in room: for talk in room:
start = event_tz.localize(datetime.strptime( start = event_tz.localize(
datetime.strptime(
talk["date"][:19], "%Y-%m-%dT%H:%M:%S" talk["date"][:19], "%Y-%m-%dT%H:%M:%S"
)) )
)
d_h, d_m = talk["duration"].split(":") d_h, d_m = talk["duration"].split(":")
end = start + timedelta(hours=int(d_h), minutes=int(d_m)) end = start + timedelta(hours=int(d_h), minutes=int(d_m))
talk["start_ts"] = int(timegm(start.timetuple()) - start.utcoffset().total_seconds()) talk["start_ts"] = int(
timegm(start.timetuple())
- start.utcoffset().total_seconds()
)
talk["start_str"] = talk["start"] talk["start_str"] = talk["start"]
talk["end_ts"] = int(timegm(end.timetuple()) - end.utcoffset().total_seconds()) talk["end_ts"] = int(
timegm(end.timetuple())
- end.utcoffset().total_seconds()
)
talk["locale"] = talk["language"] talk["locale"] = talk["language"]
track = None track = None