From kde-frameworks-devel Thu Jan 07 12:25:45 2016 From: "David Faure" Date: Thu, 07 Jan 2016 12:25:45 +0000 To: kde-frameworks-devel Subject: Re: Review Request 126659: [kio_ftp] fix display of file/directory modification time/date Message-Id: <20160107122545.6499.74219 () mimi ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-frameworks-devel&m=145216958921004 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============2139744663600283668==" --===============2139744663600283668== Content-Type: multipart/alternative; boundary="===============5767768928734185566==" --===============5767768928734185566== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/126659/#review90750 ----------------------------------------------------------- Ship it! Ship It! - David Faure On Jan. 7, 2016, 12:23 p.m., Wolfgang Bauer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/126659/ > ----------------------------------------------------------- > > (Updated Jan. 7, 2016, 12:23 p.m.) > > > Review request for KDE Frameworks, kdelibs and David Faure. > > > Bugs: 354597 > https://bugs.kde.org/show_bug.cgi?id=354597 > > > Repository: kio > > > Description > ------- > > - 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. > > > Diffs > ----- > > src/ioslaves/ftp/ftp.cpp 2179179 > > Diff: https://git.reviewboard.kde.org/r/126659/diff/ > > > Testing > ------- > > Connected to an FTP server with dolphin (15.12.0). The modification times/dates are now shown correctly. > > > Thanks, > > Wolfgang Bauer > > --===============5767768928734185566== MIME-Version: 1.0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/126659/

Ship it!

Ship It!

- David Faure


On January 7th, 2016, 12:23 p.m. UTC, Wolfgang Bauer wrote:

Review request for KDE Frameworks, kdelibs and David Faure.
By Wolfgang Bauer.

Updated Jan. 7, 2016, 12:23 p.m.

Bugs: 354597
Repository: kio

Description

  • 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.

Testing

Connected to an FTP server with dolphin (15.12.0). The modification times/dates are now shown correctly.

Diffs

  • src/ioslaves/ftp/ftp.cpp (2179179)

View Diff

--===============5767768928734185566==-- --===============2139744663600283668== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KS2RlLWZyYW1l d29ya3MtZGV2ZWwgbWFpbGluZyBsaXN0CktkZS1mcmFtZXdvcmtzLWRldmVsQGtkZS5vcmcKaHR0 cHM6Ly9tYWlsLmtkZS5vcmcvbWFpbG1hbi9saXN0aW5mby9rZGUtZnJhbWV3b3Jrcy1kZXZlbAo= --===============2139744663600283668==--