Skip to content

Commit

Permalink
BUG: remove timezone
Browse files Browse the repository at this point in the history
Remove unnecessary information from timestamps.
  • Loading branch information
aburrell committed Sep 3, 2024
1 parent 44dbee6 commit 1ae0983
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pysatMadrigal/instruments/madrigal_dst.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
madrigal_inst_code = 212
madrigal_tag = {'': {'': "30006"}}
madrigal_start = dt.datetime(1957, 1, 1)
madrigal_end = dt.datetime.now(tz=dt.timezone.utc)
madrigal_end = pysat.utils.time.filter_datetime_input(
dt.datetime.now(tz=dt.timezone.utc))

# Local attributes
#
Expand Down
3 changes: 2 additions & 1 deletion pysatMadrigal/instruments/madrigal_geoind.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
madrigal_inst_code = 210
madrigal_tag = {'': {'': "30007"}}
madrigal_start = dt.datetime(1950, 1, 1)
madrigal_end = dt.datetime.now(tz=dt.timezone.utc)
madrigal_end = pysat.utils.time.filter_datetime_input(
dt.datetime.now(tz=dt.timezone.utc))

# Local attributes
#
Expand Down
4 changes: 3 additions & 1 deletion pysatMadrigal/instruments/methods/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,8 @@ def download(date_array, inst_code=None, kindat=None, data_path=None,

def get_remote_filenames(inst_code=None, kindat='', user=None, password=None,
web_data=None, url="http://cedar.openmadrigal.org",
start=dt.datetime(1900, 1, 1), stop=dt.datetime.now(),
start=dt.datetime(1900, 1, 1),
stop=dt.datetime.now(tz=dt.datetime.utc),
date_array=None):
"""Retrieve the remote filenames for a specified Madrigal experiment.
Expand Down Expand Up @@ -1103,6 +1104,7 @@ def get_remote_filenames(inst_code=None, kindat='', user=None, password=None,

if stop is None:
stop = dt.datetime.now(tz=dt.timezone.utc)
stop = pysat.utils.time.filter_datetime_input(stop)

# If start and stop are identical, increment
if start == stop:
Expand Down

0 comments on commit 1ae0983

Please sign in to comment.