$ jshell
| Welcome to JShell -- Version 16
| For an introduction type: /help intro
jshell> import java.time.*
jshell> import java.time.format.*
jshell> Instant.ofEpochSecond(-1856044800)
...> .atZone(ZoneId.of("Europe/Paris"))
...> .format(DateTimeFormatter.ofPattern("dd MM yyyy HH:mm:ss z"))
...>
$3 ==> "10 03 1911 00:09:21 CET"
jshell>
$ TZ=Europe/Paris date -d @-1856044800
Fri 10 Mar 1911 12:09:21 AM PMT
According to TZDB, the result printed by the Linux `date` command is correct: https://github.com/eggert/tz/blob/5c79ca1f7b574798dc5f05ab0eeaae30ceb948e4/europe#L1387
I tested this with JDK 16 on MacOS and with JDK 11 on Linux and saw the same results.
| Welcome to JShell -- Version 16
| For an introduction type: /help intro
jshell> import java.time.*
jshell> import java.time.format.*
jshell> Instant.ofEpochSecond(-1856044800)
...> .atZone(ZoneId.of("Europe/Paris"))
...> .format(DateTimeFormatter.ofPattern("dd MM yyyy HH:mm:ss z"))
...>
$3 ==> "10 03 1911 00:09:21 CET"
jshell>
$ TZ=Europe/Paris date -d @-1856044800
Fri 10 Mar 1911 12:09:21 AM PMT
According to TZDB, the result printed by the Linux `date` command is correct: https://github.com/eggert/tz/blob/5c79ca1f7b574798dc5f05ab0eeaae30ceb948e4/europe#L1387
I tested this with JDK 16 on MacOS and with JDK 11 on Linux and saw the same results.
- relates to
-
JDK-8024267 Stop using LMT for time-zones
-
- Open
-