From 737701215bc2e6485ae95a4aebfbbe00a45757db Mon Sep 17 00:00:00 2001 From: Victor Osipov Date: Fri, 15 Dec 2023 17:15:28 +0000 Subject: [PATCH] DDCE-5239 - Migrate org.joda to java.time --- .../currencyconversion/connectors/HttpDate.scala | 14 +++++++------- project/AppDependencies.scala | 2 +- project/plugins.sbt | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/uk/gov/hmrc/currencyconversion/connectors/HttpDate.scala b/app/uk/gov/hmrc/currencyconversion/connectors/HttpDate.scala index 5fcf57e..48cf97c 100644 --- a/app/uk/gov/hmrc/currencyconversion/connectors/HttpDate.scala +++ b/app/uk/gov/hmrc/currencyconversion/connectors/HttpDate.scala @@ -16,16 +16,16 @@ package uk.gov.hmrc.currencyconversion.connectors -import org.joda.time.format.{DateTimeFormat, DateTimeFormatter} -import org.joda.time.{DateTime, DateTimeZone} +import java.time.format.DateTimeFormatter +import java.time.{LocalDateTime, ZoneId} trait HttpDate { - protected val dateFormatter: DateTimeFormatter = - DateTimeFormat - .forPattern("EEE, dd MMM yyyy HH:mm:ss 'GMT'") - .withZone(DateTimeZone.UTC) + private val dateFormatter: DateTimeFormatter = + DateTimeFormatter + .ofPattern("EEE, dd MMM yyyy HH:mm:ss 'GMT'") def now: String = - dateFormatter.print(DateTime.now.withZone(DateTimeZone.UTC)) + dateFormatter.format(LocalDateTime.now(ZoneId.of("UTC"))) + } diff --git a/project/AppDependencies.scala b/project/AppDependencies.scala index 8790038..96c935b 100644 --- a/project/AppDependencies.scala +++ b/project/AppDependencies.scala @@ -3,7 +3,7 @@ import sbt.* object AppDependencies { private lazy val bootstrapPlayVersion = "7.23.0" - private lazy val hmrcMongoVersion = "1.3.0" + private lazy val hmrcMongoVersion = "1.6.0" private lazy val compile: Seq[ModuleID] = Seq( "uk.gov.hmrc" %% "bootstrap-backend-play-28" % bootstrapPlayVersion, diff --git a/project/plugins.sbt b/project/plugins.sbt index 85a70b9..6401840 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -8,7 +8,7 @@ resolvers += Resolver.url("HMRC-open-artefacts-ivy2", url("https://open.artefact ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.15.0") -addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.2.0") +addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.4.0") addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.21") addSbtPlugin("org.scalastyle" % "scalastyle-sbt-plugin" % "1.0.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")