Write human-readable log in Eastern Time
This commit is contained in:
parent
eeeb841a15
commit
168cc371cb
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue