1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-05-07 13:38:17 +00:00

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

View file

@ -83,6 +83,10 @@ class PDFInfoPage(Flowable):
talk_start = self.talk.local_start talk_start = self.talk.local_start
else: else:
talk_start = self.talk.start.astimezone(self.event.tz) 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 # add some information horizontally to the side of the page
self.canv.saveState() self.canv.saveState()
self.canv.rotate(90) self.canv.rotate(90)
@ -119,7 +123,8 @@ class PDFInfoPage(Flowable):
[ [
self.event.name.localize(self.event.locale), self.event.name.localize(self.event.locale),
self.room["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"], style=self.style["Meta"],