From d69b5877eeacc21f66b9c3e98940f0c53a28328c Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 9 Mar 2024 22:51:37 -0600 Subject: [PATCH] Display battle time --- app/models/Schema.scala | 2 ++ app/views/battle/view.scala.html | 2 +- app/views/battleRows.scala.html | 2 +- app/views/board/robot.scala.html | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/Schema.scala b/app/models/Schema.scala index a81cedc..39cdc8a 100644 --- a/app/models/Schema.scala +++ b/app/models/Schema.scala @@ -227,7 +227,9 @@ object Schema { .appendHourOfDay(2) .appendLiteral(':') .appendMinuteOfHour(2) + .appendLiteral(" UTC") .toFormatter + .withZone(DateTimeZone.UTC) def formatCreatedTime(): String = { createdTimeFormatter.print(created) diff --git a/app/views/battle/view.scala.html b/app/views/battle/view.scala.html index da75abf..3498fe2 100644 --- a/app/views/battle/view.scala.html +++ b/app/views/battle/view.scala.html @@ -23,7 +23,7 @@ -

battle #@fullBattle.b.id.id, @fullBattle.b.formatCreated()

+

battle #@fullBattle.b.id.id, @fullBattle.b.formatCreatedTime()

@fullBattle.b.winner match { case Some(Team.R1) => { diff --git a/app/views/battleRows.scala.html b/app/views/battleRows.scala.html index 6e51fe3..6b594bd 100644 --- a/app/views/battleRows.scala.html +++ b/app/views/battleRows.scala.html @@ -3,7 +3,7 @@ @for(FullBattle(battle, r1, r2) <- battles) { - @battle.formatCreated() + @battle.formatCreatedTime() #@battle.id.id diff --git a/app/views/board/robot.scala.html b/app/views/board/robot.scala.html index ab82df9..9e141af 100644 --- a/app/views/board/robot.scala.html +++ b/app/views/board/robot.scala.html @@ -10,7 +10,7 @@

@boardW @for(FullBattle(battle, r1, r2) <- boardWithBattles.battles) { @defining(if (r1.id == robot.id) { (r1, r2) } else (r2, r1)) { case (ourR, otherR) => - @battle.formatCreated() + @battle.formatCreatedTime() #@battle.id.id