Skip to content

Commit

Permalink
Remove iCal UTC timezone format appendage or 'Z' to the timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Jun 26, 2024
1 parent 6da22c6 commit be69824
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,7 @@ public void ical() throws ParseException, IOException {
}

static String toFormatedLocalDateTime(ZonedDateTime zonedDateTime) {
String result = zonedDateTime.format(DateTimeFormatter.ofPattern("yyyyMMdd'T'hhmmss"));
if (zonedDateTime.getZone().getId().equals("Etc/UTC")) {
result += "Z";
}
return result;
return zonedDateTime.format(DateTimeFormatter.ofPattern("yyyyMMdd'T'hhmmss"));
}

}

0 comments on commit be69824

Please sign in to comment.