Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Update Gridmet_current.py
Browse files Browse the repository at this point in the history
Update so that time check is based on MST
  • Loading branch information
rmcd-mscb authored Nov 9, 2020
1 parent 901021f commit 2f0f166
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/Gridmet_current.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ def getxml(url):
'agg_met_vs_1979_CurrentYear_CONUS.nc']
urlsuffix = 'dataset.xml'

now = datetime.today().date()
yesterday = now - timedelta(days=1)
#print(datetime.tzinfo, datetime.utcoffset(datetime.now()))
nowutc = datetime.utcnow()
now = nowutc - timedelta(hours=7)
yesterday = (now - timedelta(days=1)).date()
print('nowutc: ', nowutc, ' now: ', now, ' yesterday: ', yesterday)

for data in data_packets:
masterURL = serverURL + '/' + data + '/' + urlsuffix
Expand Down

0 comments on commit 2f0f166

Please sign in to comment.