Summary: | incorrect date/time for FTP files | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | ssemenukha <semmy> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | frank78ac, kdelibs-bugs, philippep62, scarfhogg, wbauer1 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
URL: | https://www.facebook.com/photo.php?fbid=1186973697983643&set=a.469901019690918.121306.100000130726946&type=3&theater | ||
Latest Commit: | http://commits.kde.org/kio/68af1d7e89b7fed136d4cc62b76c1c6ded2d94eb | Version Fixed In: | 5.19.0 |
Sentry Crash Report: | |||
Attachments: | incorrect and correct date/time screenshot |
Description
ssemenukha
2015-10-30 10:36:18 UTC
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. Proposed fix: https://git.reviewboard.kde.org/r/126659/ 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. FIXED-IN: 5.19.0 REVIEW: 126659 M +8 -10 src/ioslaves/ftp/ftp.cpp http://commits.kde.org/kio/68af1d7e89b7fed136d4cc62b76c1c6ded2d94eb |