OpenRailAssociation / osrd-ui

Icons, fonts, colors, components and all user interface items for OSRD project.
8 stars 5 forks source link

ui-spacetimechart: use local timezone to format time #646

Closed emersion closed 1 month ago

emersion commented 1 month ago

First, the logic was inconsistent: UTC was used for hours but the local timezone was used for minutes. This works by chance because most timezones are 1h apart, however that's not true in general (e.g. Sri Lanka has +05:30 and Australia has +09:30).

Second, we never want to display UTC to the user. Users are always interested in times given in their timezone.