From 34babcf0193ebeae8ceb22d9e58967a312a21778 Mon Sep 17 00:00:00 2001 From: Max Duval Date: Fri, 7 Jun 2024 12:01:11 +0100 Subject: [PATCH] feat: always BST times --- sport/app/football/views/wallchart/knockoutMatch.scala.html | 5 +++-- sport/app/football/views/wallchart/knockoutSpider.scala.html | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sport/app/football/views/wallchart/knockoutMatch.scala.html b/sport/app/football/views/wallchart/knockoutMatch.scala.html index eb31cd4417b..d29380602bb 100644 --- a/sport/app/football/views/wallchart/knockoutMatch.scala.html +++ b/sport/app/football/views/wallchart/knockoutMatch.scala.html @@ -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._ @@ -25,8 +26,8 @@ } @if(fm.isFixture){
- @fm.date.format(DateTimeFormatter.ofPattern("HH:mm  z").withZone(Edition(request).timezoneId)) - @fm.date.withZoneSameInstant(Edition(request).timezoneId).toLocalDate.format(DateTimeFormatter.ofPattern("E dd MMMM ")) + @fm.date.format(DateTimeFormatter.ofPattern("HH:mm  z").withZone(ZoneId.of("Europe/London"))) + @fm.date.withZoneSameInstant(ZoneId.of("Europe/London")).toLocalDate.format(DateTimeFormatter.ofPattern("E dd MMMM "))
} diff --git a/sport/app/football/views/wallchart/knockoutSpider.scala.html b/sport/app/football/views/wallchart/knockoutSpider.scala.html index 894fd7aae5f..f1565bd2ee2 100644 --- a/sport/app/football/views/wallchart/knockoutSpider.scala.html +++ b/sport/app/football/views/wallchart/knockoutSpider.scala.html @@ -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) @@ -67,5 +68,5 @@ } -
All matches are in @DateTimeFormatter.ofPattern("z").format(ZonedDateTime.of(knockoutStage.matches.head.date.toLocalDate, LocalTime.of(0, 0), Edition(request).timezoneId)) time
+
All matches are in @DateTimeFormatter.ofPattern("z").format(ZonedDateTime.of(knockoutStage.matches.head.date.toLocalDate, LocalTime.of(0, 0), ZoneId.of("Europe/London"))) time