beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
61 stars 53 forks source link

Fix incorrect timezone on match list page #515

Closed jauggy closed 3 weeks ago

jauggy commented 1 month ago

The timezone is incorrect on the list page https://discord.com/channels/549281623154229250/1297333683619106938

This PR fixes it by applying code change that is similar on other pages which is working correctly.

The correct code has a tz parameter e.g. on /lib/teiserver_web/live/battles/match/show.html.heex we have:

       <div class="col">
          <strong>Started:</strong> <%= date_to_str(@match.started, format: :ymd_hms, tz: @tz) %>
        </div>

        <div class="col">
          <strong>Finished:</strong> <%= date_to_str(@match.finished, format: :ymd_hms, tz: @tz) %>
        </div>