Skip to content

Commit

Permalink
Update datetime format in VFPA HADCP data handling (#282)
Browse files Browse the repository at this point in the history
The datetime parsing format was adjusted in the VFPA HADCP data handling module.
This change will ensure the timestamp is correctly interpreted as
YYYY-MM-DD HH:MM as opposed to the previous format DD/MM/YYYY HH:MM. This change
was necessitated by a change in the datetime format in the observation .csv
files that was made between 17:00 and 18:00 UTC on 2023-07-02.
  • Loading branch information
douglatornell authored Jul 13, 2024
1 parent 66db22d commit 95a9863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nowcast/workers/get_vfpa_hadcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def _csv_to_dataset(csv_file, place):
df = df.drop([col], axis="columns")
except KeyError:
pass
df.index = pandas.to_datetime(df.index, format="%d/%m/%Y %H:%M")
df.index = pandas.to_datetime(df.index, format="%Y-%m-%d %H:%M")
df.index.name = "time"
df.columns = ("speed", "direction")
return xarray.Dataset.from_dataframe(df)
Expand Down

0 comments on commit 95a9863

Please sign in to comment.