diff --git a/python/ribasim/ribasim/delwaq/generate.py b/python/ribasim/ribasim/delwaq/generate.py index e99abd63c..b4997915b 100644 --- a/python/ribasim/ribasim/delwaq/generate.py +++ b/python/ribasim/ribasim/delwaq/generate.py @@ -75,7 +75,7 @@ def _make_boundary(data, boundary_type): .reset_index(drop=True) ) # Convert Arrow time to Numpy to avoid needing tzdata somehow - piv.time = pd.to_datetime(piv.time).dt.strftime("%Y-%m-%d %H:%M:%S") + piv.time = piv.time.astype("datetime64[ns]").dt.strftime("%Y-%m-%d %H:%M:%S") boundary = { "name": bid, "substances": list(map(_quote, piv.columns[1:])), diff --git a/python/ribasim_testmodels/ribasim_testmodels/basic.py b/python/ribasim_testmodels/ribasim_testmodels/basic.py index db0555c36..f431150a7 100644 --- a/python/ribasim_testmodels/ribasim_testmodels/basic.py +++ b/python/ribasim_testmodels/ribasim_testmodels/basic.py @@ -291,12 +291,12 @@ def tabulated_rating_curve_model() -> ribasim.Model: tabulated_rating_curve.Time( time=[ # test millisecond precision - pd.Timestamp("2020-01-01 00:00:00.001"), - pd.Timestamp("2020-01-01 00:00:00.001"), - pd.Timestamp("2020-02"), - pd.Timestamp("2020-02"), - pd.Timestamp("2020-03"), - pd.Timestamp("2020-03"), + pd.Timestamp("2020-01-01"), + pd.Timestamp("2020-01-01"), + pd.Timestamp("2020-02-01 00:00:00.001"), + pd.Timestamp("2020-02-01 00:00:00.001"), + pd.Timestamp("2020-03-01"), + pd.Timestamp("2020-03-01"), ], level=[0.0, 1.0, 0.0, 1.1, 0.0, 1.2], flow_rate=[0.0, 10 / 86400, 0.0, 10 / 86400, 0.0, 10 / 86400],