Hi I need to get the last modified time of the files in an FTP server. I m ve tried two ways but none work:
1) First i tried the getModificationTime() method like this
String time = ftp.getModificationTime(filePath);
Date d = new Date(Long.parseLong(time));
As a result I receive time: 20151211120410
and d: 2608-07-26
, when the correct date is: 2015-11-12
2) Then I tried the mdtm() method. However, this one returns an int
. In my case it just returned 213.
Any ideas on how to get the correct modified time and convert it to a readable format?
Thank you