Skip to content

Instantly share code, notes, and snippets.

def get_exams_by_date(date: datetime):
exams = Exam.objects.filter(time=date)
if not exams:
return
Path("logs_ustudy").mkdir(parents=True, exist_ok=True)
to_zone = tz.tzlocal()
date = date.astimezone(to_zone)
file_path = f'logs_ustudy/{date}.xlsx'