From 2797c636986ad03feb0ce2001c6b8c9e5791227a Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Mon, 8 Apr 2024 21:16:09 +0200 Subject: [PATCH] use ERDDAP default format --- gliderpy/fetchers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gliderpy/fetchers.py b/gliderpy/fetchers.py index 009d915..8afe13e 100644 --- a/gliderpy/fetchers.py +++ b/gliderpy/fetchers.py @@ -47,7 +47,10 @@ def standardise_df(glider_df: pd.DataFrame, dataset_url: str) -> pd.DataFrame: glider_df.columns = glider_df.columns.str.lower() glider_df = glider_df.set_index("time (utc)") glider_df = glider_df.rename(columns=server_parameter_rename) - glider_df.index = pd.to_datetime(glider_df.index) + glider_df.index = pd.to_datetime( + glider_df.index, + format="%Y-%m-%dT%H:%M:%SZ", + ) # We need to sort b/c of the non-sequential submission of files due to # the nature of glider data transmission. glider_df = glider_df.sort_index()