Skip to content

Commit

Permalink
Merge pull request #75 from hmrc/DDCE-5239
Browse files Browse the repository at this point in the history
DDCE-5239 - Migrate org.joda to java.time
  • Loading branch information
gastonracui authored Dec 18, 2023
2 parents 81e9048 + 7377012 commit 4900a60
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions app/uk/gov/hmrc/currencyconversion/connectors/HttpDate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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")))

}
2 changes: 1 addition & 1 deletion project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 4900a60

Please sign in to comment.