Skip to content

Commit a840615

Browse files
authored
fix: use Israel midnight for date filtering in rides_execution (#55)
1 parent 20636b5 commit a840615

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

open_bus_stride_api/routers/rides_execution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def list_(limit: int = common.param_limit(default_limit=DEFAULT_LIMIT),
4444
where
4545
sr.operator_ref = :operator_ref
4646
and sr.line_ref = :line_ref
47-
and date_trunc('day', siri_ride.scheduled_start_time) between :date_from and :date_to
47+
and date_trunc('day', siri_ride.scheduled_start_time AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Jerusalem') between :date_from and :date_to
4848
) actual_rides
4949
full outer join
5050
(select
@@ -55,7 +55,7 @@ def list_(limit: int = common.param_limit(default_limit=DEFAULT_LIMIT),
5555
where
5656
gr.operator_ref = :operator_ref
5757
and gr.line_ref = :line_ref
58-
and date_trunc('day', gtfs_ride.start_time) between :date_from and :date_to
58+
and date_trunc('day', gtfs_ride.start_time AT TIME ZONE 'UTC' AT TIME ZONE 'Asia/Jerusalem') between :date_from and :date_to
5959
) planned_rides
6060
on
6161
actual_rides.start_time = planned_rides.start_time

0 commit comments

Comments
 (0)