Skip to content

Fix train times rendering as UTC instead of app timezone - #6

Merged
timvandijck merged 1 commit into
mainfrom
fix-train-time-timezone
Apr 16, 2026
Merged

timvandijck merged 1 commit into
mainfrom
fix-train-time-timezone

Conversation

@timvandijck

Copy link
Copy Markdown
Member

Summary

Carbon::createFromTimestamp($ts) without a timezone argument returns a UTC instance in Carbon 3.x, regardless of date_default_timezone_get() or config('app.timezone'). As a result, train departure times in the tile render as UTC for every installation — e.g. a train leaving at 13:35 Brussels time shows as 11:35.

This passes config('app.timezone') as the second argument so times render in the app's configured timezone.

Test plan

  • Run the tile on an app with 'timezone' => 'Europe/Brussels' and confirm times match the iRail/Belgian Railways schedule.
  • Run the tile on an app with 'timezone' => 'UTC' and confirm behavior is unchanged.

@timvandijck
timvandijck merged commit 509f6f3 into main Apr 16, 2026
9 checks passed
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.

1 participant