How to get remote file timestamp including milliseconds using jsch framework. I tried as below but till seconds only I get.
ChannelSftp channelSftp = (ChannelSftp) jschSession.openChannel("sftp");
channelSftp.connect();
List<LsEntry> files = channelSftp.ls("*.log");
for (LsEntry entry : files) {
log.info("File ", entry.getFilename()+":"+entry.getAttrs().getMtimeString());
}
Output:
File app1.log: Fri Dec 23 12:32:52 IST 2022
File app2.log: Fri Dec 23 12:32:52 IST 2022
Expected Output: with timestamp
File app1.log: Fri Dec 23 12:32:52.1234556789 IST 2022
File app2.log: Fri Dec 23 12:32:52.3334556789 IST 2022
Please help to get milliseconds too.