diff --git a/pomodoroprompt.py b/pomodoroprompt.py index c338f33..ea8bc68 100644 --- a/pomodoroprompt.py +++ b/pomodoroprompt.py @@ -2,6 +2,7 @@ import csv import time from datetime import datetime, timedelta from pathlib import Path +from pytz import timezone import pytz import zenipy @@ -49,7 +50,9 @@ def quit_prompt(): else: quit_prompt() -def log_step(text, start, end_section=False): +def log_step(text, utc_start, end_section=False): + eastern = timezone('US/Eastern') + start = utc_start.astimezone(eastern) timelog_path = 'log/' + str(start.year) + '-' + format(start.month, '02') + '-' + format(start.day, '02') + '.log' timelog_file = Path(timelog_path) timelog_file.touch(exist_ok=True)