fix a bug where shift is calculated wrong

we need to use the hour in PST, which we just hard-code as 8 hours.
If we ever hit DST before the run, we'll go back and do it properly.
pull/302/head
Mike Lang 2 years ago committed by Mike Lang
parent cfe93e31dd
commit 05816ac51d

@ -179,7 +179,9 @@ def get_row(ident):
if response['event_start'] is not None:
start = response['event_start']
if response['thumbnail_template'] is None:
response['thumbnail_template'] = DEFAULT_TEMPLATES[int(start.hour / 6)]
pst_hour = (start.hour - 8) % 24
shift = int(pst_hour / 6)
response['thumbnail_template'] = DEFAULT_TEMPLATES[shift]
if response['thumbnail_time'] is None:
if response['event_end'] is not None:
# take full duration, and add half to start to get halfway

Loading…
Cancel
Save