Skip to content

Commit

Permalink
Merge pull request #101 from ocefpaf/format_dates
Browse files Browse the repository at this point in the history
Format dates
  • Loading branch information
ocefpaf authored Apr 8, 2024
2 parents 26dee4c + 2797c63 commit b31fbe1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-ast
Expand All @@ -27,7 +27,7 @@ repos:
- id: blackdoc

- repo: https://github.com/econchick/interrogate
rev: 1.5.0
rev: 1.7.0
hooks:
- id: interrogate
exclude: ^(docs|tests)
Expand Down
5 changes: 4 additions & 1 deletion gliderpy/fetchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit b31fbe1

Please sign in to comment.