Fix test errors #31
1 changed files with 4 additions and 0 deletions
|
|
@ -98,6 +98,10 @@ public class ActivityFormatter {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static LocalDateTime getUtcDateTimeInZone(LocalDateTime utcDateTime, String timezone) {
|
private static LocalDateTime getUtcDateTimeInZone(LocalDateTime utcDateTime, String timezone) {
|
||||||
|
if (timezone == null || timezone.isBlank()) {
|
||||||
|
return utcDateTime;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return utcDateTime.atZone(ZoneOffset.UTC)
|
return utcDateTime.atZone(ZoneOffset.UTC)
|
||||||
.withZoneSameInstant(ZoneId.of(timezone))
|
.withZoneSameInstant(ZoneId.of(timezone))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue