Skip to content

fix: rides_execution not retune time whit time zone - #52

Merged
OriHoch merged 2 commits into
hasadna:mainfrom
AvivAbachi:fix/rides_execution-not-retune-time-whit-timezone
Oct 28, 2025
Merged

fix: rides_execution not retune time whit time zone#52
OriHoch merged 2 commits into
hasadna:mainfrom
AvivAbachi:fix/rides_execution-not-retune-time-whit-timezone

Conversation

@AvivAbachi

@AvivAbachi AvivAbachi commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

This is a case of setting the wrong timezone in the client, resulting in incorrect data displayed on the gap page.

  • Pass all tests.
  • Test locally, the server and client with different time zones.

@AvivAbachi
AvivAbachi requested a review from OriHoch October 27, 2025 23:36
@AvivAbachi AvivAbachi changed the title fix: rides-execution adjust timestamp in rides query fix: rides_execution not retune time whit time zone Oct 28, 2025

@OriHoch OriHoch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all the times are sent in UTC, so there is no need to add a timezone it will always be +00:00
you should handle timezone in the client-side

also, I think API should have consistent behavior currently it always returns times in UTC for all responses, so if this change is really needed then it should be applied globally to all responses, but that would be a big change affecting many places and users of the API, so I would recommend not to do that

@AvivAbachi

AvivAbachi commented Oct 28, 2025

Copy link
Copy Markdown
Contributor Author

https://open-bus-stride-api.hasadna.org.il/rides_execution/list?limit=1&date_from=2024-11-03&date_to=2024-11-03&operator_ref=3&line_ref=37689

  • before
[
  {
    "planned_start_time": "2024-11-03T03:45:00",
    "actual_start_time": "2024-11-03T03:45:00",
    "gtfs_ride_id": 91413633
  }
]
  • after
[
  {
    "planned_start_time": "2024-11-03T03:45:00+00:00",
    "actual_start_time": "2024-11-03T03:45:00+00:00",
    "gtfs_ride_id": 91413633
  }
]

This is the only place it is not returning with +00:00

@OriHoch

OriHoch commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

you are right my mistake, I see most other places also return with timezone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants