add talk end time to pdf export

This commit is contained in:
Franzi 2022-12-21 10:41:22 +01:00
parent dd0f0ad4f0
commit d86cd011f3
Signed by: kunsi
GPG Key ID: 12E3D2136B818350
1 changed files with 6 additions and 1 deletions

View File

@ -83,6 +83,10 @@ class PDFInfoPage(Flowable):
talk_start = self.talk.local_start
else:
talk_start = self.talk.start.astimezone(self.event.tz)
if hasattr(self.talk, "local_end"):
talk_end = self.talk.local_end
else:
talk_end = self.talk.end.astimezone(self.event.tz)
# add some information horizontally to the side of the page
self.canv.saveState()
self.canv.rotate(90)
@ -119,7 +123,8 @@ class PDFInfoPage(Flowable):
[
self.event.name.localize(self.event.locale),
self.room["name"].localize(self.event.locale),
talk_start.strftime("%F %T"),
talk_start.strftime("%F"),
f'{talk_start.strftime("%T")} - {talk_end.strftime("%T")}',
],
),
style=self.style["Meta"],