Skip to content

Commit

Permalink
Merge pull request #1194 from ministryofjustice/changelog-fix-timestamp
Browse files Browse the repository at this point in the history
to fix date on change log
  • Loading branch information
kth13 authored Sep 14, 2022
2 parents a20a6a0 + f2b653f commit cb53f27
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ data class ChangelogValuesDTO(
AmendTopic.NEEDS_AND_REQUIREMENTS_INTERPRETER_REQUIRED, "Interpreter required was changed"
)
fun from(changelog: Changelog, userDetail: UserDetail): ChangelogValuesDTO {
val dateTimeFormatter = DateTimeFormatter.ofPattern("dd MMM yyyy 'at' h.mm a")
val dateTimeFormatter = DateTimeFormatter.ofPattern("dd MMM yyyy 'at' h.mma")
return ChangelogValuesDTO(
changelogId = changelog.id,
referralId = changelog.referralId,
topic = changelog.topic,
description = amendTopicDescription[changelog.topic]!!,
changedAt = changelog.changedAt.format(dateTimeFormatter),
changedAt = changelog.changedAt.format(dateTimeFormatter).replace("AM", "am").replace("PM", "pm"),
name = userDetail.firstName + ' ' + userDetail.lastName,
reasonForChange = changelog.reasonForChange
)
Expand Down

0 comments on commit cb53f27

Please sign in to comment.