Why does

ZonedDateTime now = ZonedDateTime.now();
System.out.println(now.withZoneSameInstant(ZoneOffset.UTC)
        .equals(now.withZoneSameInstant(ZoneId.of("UTC"))));

print out false?

I would expect the both ZonedDateTime instances to be equal.

1 Answer
1

Leave a Reply

Your email address will not be published. Required fields are marked *