OS: Kubuntu 15.10 upgraded from 15.04
Actually dolphin show incorrect date/time for FTP files.
Steps to Reproduce:
1. Connect to any FTP server
2. Enter enywhere
3. Right click on file and select "Item properties"
incorrect date/time for FTP files
correct date/time for FTP files
Created attachment 95221 [details]
incorrect and correct date/time screenshot
Actual date/time of file "master.css" is: 2015, october 30 02:16
Dialog shows date: 2106, february 7
Confirmed on Kubuntu 15.10
Dolphin version 15.08.2 / KDE Frameworks 5.15.0 / Qt 5.4.2
Same as above for me.
Thanks for the bug report. Do you see the same issue in the file dialog of KWrite or other KDE applications?
Yes, just tried with the Kate file dialog. It has the same issue.
Thanks for the quick reply! It probably is a bug either in the ftp/sftp kioslave or in the KIO framework then.
I had a look at this, the problem is that the year is calculated wrong in kio_ftp.
Git commit 68af1d7e89b7fed136d4cc62b76c1c6ded2d94eb by Wolfgang Bauer.
Committed on 07/01/2016 at 12:38.
Pushed by wbauer into branch 'master'.
[kio_ftp] fix display of file/directory modification time/date
- QDate() treats the year literally (i.e. 90 is really year 90, not
1990), so subtracting 1900 is wrong.
- Use QDate::currentDate() instead of QDateTime::currentDateTime(), we
only need the current date anyway
- Initialize day, month, and year to the current date instead of 0. In
the case when no year is mentioned in the server's reply (the year is
implicit), it wasn't set to the current year at all, so the result was
either 0 or -1.
M +8 -10 src/ioslaves/ftp/ftp.cpp