Skip to content

Commit

Permalink
fix time zone bug in headway accuracy logging (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
panentheos authored Sep 7, 2023
1 parent ce71d1d commit 8c9a3ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/headway_analysis/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ defmodule HeadwayAnalysis.Server do
@impl true
def handle_info(:update, state) do
schedule_update(self())
current_time = Timex.now()

current_time =
DateTime.utc_now() |> DateTime.shift_zone!(Application.get_env(:realtime_signs, :time_zone))

{headway_low, headway_high} =
case state.config_engine.headway_config(state.headway_group, current_time) do
Expand Down

0 comments on commit 8c9a3ea

Please sign in to comment.