Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix datetime import in dc_time util #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion utils/data_cube_utilities/dc_time.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import numpy as np
from datetime import datetime

def dt_to_str(date, fmt='%Y-%m-%d'):
"""
Expand Down Expand Up @@ -33,4 +34,4 @@ def _scalar_to_n64_datetime(scalar):
dt64: numpy.datetime64
The NumPy datetime64 object representing the datetime of the scalar argument.
"""
return (scalar * np.timedelta64(1, 's')) + np.datetime64('1970-01-01T00:00:00Z')
return (scalar * np.timedelta64(1, 's')) + np.datetime64('1970-01-01T00:00:00Z')