tl-its-umich-edu / unizin-validation

Unizin Validation Scripts
1 stars 4 forks source link

Using local time to determine header date #23

Closed ssciolla closed 4 years ago

ssciolla commented 4 years ago

This PR makes a couple modifications to validate.py in order to make the date listed in the header reflect the local time(for our team, Eastern). Previously, pytz.UTC was passed to datetime.now(); parsing the object resulted in a date that was one day ahead of the local time (the script is run by Jenkins at 10:50-ish EST, and UTC is a handful of hours ahead). To get the date for the local time, we can simply just call now() without parameters. I also removed the import for pytz (it's still imported in dbqueries.py) and un-commented a blank line. The PR aims to resolve issue #22.