Skip to content

Commit

Permalink
feat: always BST times
Browse files Browse the repository at this point in the history
  • Loading branch information
mxdvl committed Jun 7, 2024
1 parent 7ff9587 commit cb7ff91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions sport/app/football/views/wallchart/knockoutMatch.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@import common.Edition
@import java.time.LocalTime
@import java.time.ZonedDateTime
@import java.time.ZoneId
@(fm: pa.FootballMatch, round: pa.Round, competition: model.Competition)(implicit request: RequestHeader)

@import implicits.Football._
Expand All @@ -25,8 +26,8 @@
}
@if(fm.isFixture){
<div class="football-match__date">
<span class="football-match__kickoff">@fm.date.format(DateTimeFormatter.ofPattern("HH:mm  z").withZone(Edition(request).timezoneId))</span>
@fm.date.withZoneSameInstant(Edition(request).timezoneId).toLocalDate.format(DateTimeFormatter.ofPattern("E dd MMMM "))
<span class="football-match__kickoff">@fm.date.format(DateTimeFormatter.ofPattern("HH:mm  z").withZone(ZoneId.of("Europe/London")))</span>
@fm.date.withZoneSameInstant(ZoneId.of("Europe/London")).toLocalDate.format(DateTimeFormatter.ofPattern("E dd MMMM "))
</div>
}

Expand Down
3 changes: 2 additions & 1 deletion sport/app/football/views/wallchart/knockoutSpider.scala.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import java.time.format.DateTimeFormatter
@import java.time.ZonedDateTime
@import java.time.ZoneId
@import common.Edition
@import java.time.LocalTime
@(competition: model.Competition, knockoutStage: _root_.football.model.KnockoutSpider)(implicit request: RequestHeader)
Expand Down Expand Up @@ -67,5 +68,5 @@
}
</div>

<div class="football-knockout-chart__timezone">All matches are in <span class="football-matches__timezone">@DateTimeFormatter.ofPattern("z").format(ZonedDateTime.of(knockoutStage.matches.head.date.toLocalDate, LocalTime.of(0, 0), Edition(request).timezoneId))</span> time</div>
<div class="football-knockout-chart__timezone">All matches are in <span class="football-matches__timezone">@DateTimeFormatter.ofPattern("z").format(ZonedDateTime.of(knockoutStage.matches.head.date.toLocalDate, LocalTime.of(0, 0), ZoneId.of("Europe/London")))</span> time</div>
</div>

0 comments on commit cb7ff91

Please sign in to comment.