From 9b053a65e44e88c7bc21024d524c6204e44298df Mon Sep 17 00:00:00 2001 From: Adrien <50359008+AdrienLeem@users.noreply.github.com> Date: Tue, 19 Mar 2024 09:58:40 +0100 Subject: [PATCH] fix deprecation warning --- src/pyopensky/trino.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pyopensky/trino.py b/src/pyopensky/trino.py index fca1ed2..0294a6c 100644 --- a/src/pyopensky/trino.py +++ b/src/pyopensky/trino.py @@ -569,8 +569,8 @@ def history( stmt = stmt.where( StateVectorsData4.time >= start_ts, StateVectorsData4.time <= stop_ts, - StateVectorsData4.hour >= start_ts.floor("1H"), - StateVectorsData4.hour < stop_ts.ceil("1H"), + StateVectorsData4.hour >= start_ts.floor("1h"), + StateVectorsData4.hour < stop_ts.ceil("1h"), ) if len(selected_columns) > 0: @@ -775,8 +775,8 @@ def rawdata( ) .group_by(StateVectorsData4.icao24) .where( - StateVectorsData4.hour >= start_ts.floor("1H"), - StateVectorsData4.hour <= stop_ts.ceil("1H"), + StateVectorsData4.hour >= start_ts.floor("1h"), + StateVectorsData4.hour <= stop_ts.ceil("1h"), StateVectorsData4.time >= start_ts, StateVectorsData4.time <= stop_ts, ) @@ -828,8 +828,8 @@ def rawdata( stmt = stmt.where( Table.mintime >= start_ts, Table.mintime <= stop_ts, - Table.hour >= start_ts.floor("1H"), - Table.hour < stop_ts.ceil("1H"), + Table.hour >= start_ts.floor("1h"), + Table.hour < stop_ts.ceil("1h"), ) if limit is not None: