Skip to content

Commit

Permalink
Testing deployment without timezone fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davet1985 committed Apr 25, 2024
1 parent b9c667d commit a12c093
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/uk/gov/hmcts/darts/utilities/DateUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ private OffsetDateTime toOffsetDateTime(ZonedDateTime zonedDateTime) {

public OffsetDateTime toOffsetDateTime(XMLGregorianCalendar date) {
GregorianCalendar gregorianCalendar = date.toGregorianCalendar();
if (date.getTimezone() == 0) {
gregorianCalendar.setTimeZone(TimeZone.getTimeZone(UTC));
} else {
gregorianCalendar.setTimeZone(TimeZone.getTimeZone(LONDON_ZONE_ID));
}
// if (date.getTimezone() == 0) {
// gregorianCalendar.setTimeZone(TimeZone.getTimeZone(UTC));
// } else {
// gregorianCalendar.setTimeZone(TimeZone.getTimeZone(LONDON_ZONE_ID));
// }

ZonedDateTime zonedDateTime = gregorianCalendar.toZonedDateTime();
Instant instant = zonedDateTime.toInstant();
Expand Down

0 comments on commit a12c093

Please sign in to comment.