On my local configuration (Eclipse 4.11 (2019.03)
, java runtime 1.8.0, SDK 1.8.0), when converting a local date & time (provided through separate strings) to a CET ZonedDateTime
(using an intermediary LocalDateTime
built from those strings), I get the following outputs :
input : "2001-10-26" and "21:32:52" => output : 2001-10-26T21:32:52+02:00[CET]
input : "-2001-10-26" and "21:32:52" => output :-2001-10-26T21:32:52+01:00[CET]
So, we see that the UTC offset is not the same. Of course, we refer to a moment in time where "UTC" and "UTC offset" had not yet been defined... However, I guess that java designers have implemented some rules for those cases as java process them anyway. Could someone give me some enlighten about this ? I have already seen this interesting post Java 8 - tz database time zones but it stays rather vague.
Thanks for helping me with this !