On Wed, 28 Oct 2020 12:52:41 GMT, Rahul Yadav <[email protected]> wrote:
>> src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java line 1770:
>>
>>> 1768: try {
>>> 1769: var d = LocalDateTime.parse(s, RFC3659_DATETIME_FORMAT);
>>> 1770: result =
>>> Date.from(d.atZone(ZoneOffset.systemDefault()).toInstant());
>>
>> Should this be ZoneOffset.UTC rather than System default? I thought the date
>> returned by the server were supposed to be in GMT.
>
> ZoneOffset.UTC should return GMT as was the case with SimpleDateFormat before
> the changes.
right, thanks for spotting that! I don't know what I was thinking when used
`systemDefault` here and when was also got tricked by my own test 🤦
-------------
PR: https://git.openjdk.java.net/jdk/pull/867