Commit 275fe5a1 authored by Pierre Cazenave's avatar Pierre Cazenave

Fix use of deprecated time format (%s). Fixes GitHub issue #5...

Fix use of deprecated time format (%s). Fixes GitHub issue #5 https://github.com/pwcazenave/PyFVCOM/issues/5.
parent 2a2e5ad4
......@@ -170,8 +170,8 @@ def date_range(start_date, end_date, inc=1):
"""
start_seconds = int(start_date.replace(tzinfo=pytz.UTC).strftime('%s'))
end_seconds = int(end_date.replace(tzinfo=pytz.UTC).strftime('%s'))
start_seconds = int(start_date.replace(tzinfo=pytz.UTC).timestamp())
end_seconds = int(end_date.replace(tzinfo=pytz.UTC).timestamp())
inc *= 86400 # seconds
dates = np.arange(start_seconds, end_seconds, inc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment