xarray-contrib / xwrf

A lightweight interface for working with the Weather Research and Forecasting (WRF) model output in Xarray.
https://xwrf.readthedocs.io/
Apache License 2.0
56 stars 16 forks source link

Fixed decoding of timestamp by using correct format string #128

Closed lpilz closed 1 year ago

lpilz commented 1 year ago

Change Summary

Fixed the issue in #127's CI by using the correct format string without milliseconds to decode the timestamps instead of using the format string. For some reason python 3.9 and 3.10 were able to also parse datetime strings without the milliseconds added but 3.8 was not.

Related issue number

127

Checklist

lpilz commented 1 year ago

I don't really get why python 3.9 and 3.10 work when using the less accurate pd.to_datetime("2005-08-28T12:00:00", format="%Y-%m-%dT%H:%M:%S.%f") works but don't work when the more accurate ISO8601 which has milliseconds defined as optional.

lpilz commented 1 year ago

@jthielen Do we ever have the case that we need to actually take care of milliseconds?

lpilz commented 1 year ago

I'll merge it for now and we'll just have to maybe add another try-fail for milliseconds if we want to support them