Commit bcc5bb7d authored by PizZaKatZe's avatar PizZaKatZe

Fix timestamps

parent f43694b3
......@@ -68,7 +68,7 @@ def process_sessions(sessions: List[Dict], day: int) -> List[Dict]:
a list of filtered, re-organized session data
def is_correct_date(start: Dict) -> bool:
return datetime.fromtimestamp(int(start['timestamp'])).day == day
return datetime.utcfromtimestamp(int(start['timestamp'])).day == day
def relevant(session: Dict) -> bool:
return bool(list(filter(is_correct_date, session['printouts']['starts'])))
sessionss = [transform_session(s, day) for s in sessions if relevant(s)]
......@@ -119,7 +119,7 @@ def transform_session(session: Dict, day: int) -> List[Dict]:
result['end'] = end
return result
def parse_date(start: Dict) -> datetime:
return datetime.fromtimestamp(int(start['timestamp']))
return datetime.utcfromtimestamp(int(start['timestamp']))
def process_provider(provider: Dict) -> str:
return sub('Assembly:', '', sub('Room:', '', provider['fulltext']))
title = sub('Session:', '', session['fulltext'])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment