Please open an SSHD issue and attach to it not only your proposed change but also an explanation - preferably with a link to the standard/reference document on which the change is based. Please note that according to the documentation (https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works) the code is correct:
T<mtime> 0 <atime> 0 modification and access times when -p options is used (I guess you know why it doesn't make sense to transfer ctime). Times are in seconds, since 00:00:00 UTC, Jan. 1, 1970. Two zeroes are present there in case there is any need to use microseconds in the future. This message was not present in original rcp implementation. Example: T1183828267 0 1183828267 0 So I don't see the error - furthermore, based on the above documentation, the proposed change would introduce a bug since they would evaluate to zero... ________________________________ From: Nikita Anishhenko <nanishhe...@ibs.ru> Sent: Wednesday, April 26, 2017 10:32 AM To: dev@mina.apache.org Subject: Hello! I have found bug in Apache Mina Core! Hello! ScpTimestamp. parseTime must be like this: public static ScpTimestamp parseTime(String line) throws NumberFormatException { String[] numbers = GenericUtils.split(line.substring(1), ' '); // return new ScpTimestamp(TimeUnit.SECONDS.toMillis(Long.parseLong(numbers[0])), // It is an error! // TimeUnit.SECONDS.toMillis(Long.parseLong(numbers[2]))); // It is an error! return new ScpTimestamp(TimeUnit.SECONDS.toMillis(Long.parseLong(numbers[1])), // Must be like this! TimeUnit.SECONDS.toMillis(Long.parseLong(numbers[3]))); // Must be like this! }