Bug 371897

Summary: Invalid Modified date for files in FTP mode
Product: [Applications] krusader Reporter: acommi
Component: net-connectionAssignee: Krusader Bugs Distribution List <krusader-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: alex.bikadorov, krusader-bugs-null
Priority: NOR    
Version First Reported In: 2.5.0   
Target Milestone: ---   
Platform: PCLinuxOS   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: ftp file properties - invalid date

Description acommi 2016-10-31 15:56:03 UTC
Value of the Year in Modified dates for FTP files becomes 2106 instead of 2016. 

By the way, date/time format in new Krusader is not submitted to the KDE system settings.
I have «DD.MM.YY HH:MM:SS» in my Locale settings, but now in Krusader I see «MM/DD/YYYY HH:MM». I don't like it but can't change it.

Krusader 2.5.0 OpenSUSE KDE5
Comment 1 acommi 2016-10-31 16:11:39 UTC
It seems that entire date/time values for FTP files are totally wrong - all files in all directories at my FTP server have the same date: 07/02/2106. This is not true in reality.
Comment 2 Alex Bikadorov 2016-10-31 16:42:29 UTC
Does Dolphin have the same problem?
Comment 3 acommi 2016-10-31 22:23:48 UTC
In Dolphin everything is OK, as it was OK with Krusader before v.2.5.0.
Comment 4 Alex Bikadorov 2016-11-02 18:30:37 UTC
2106-02-07T06:28:14 is the maximum value for POSIX time. Either the conversion is wrong or the date is wrong from the very beginning.

On righ-click->"properties" on a file, is the date displayed there correct?
Can you check other ftp servers?

> I have «DD.MM.YY HH:MM:SS» in my Locale settings, but now in Krusader I see «MM/DD/YYYY HH:MM». I don't like it but can't change it.

The KDE5 settings are correct? Same problem in Dolphin?
In both the code is
> QLocale().toString(qDateTime, QLocale::ShortFormat);
Comment 5 acommi 2016-11-02 22:47:48 UTC
Created attachment 101987 [details]
ftp file properties - invalid date
Comment 6 acommi 2016-11-02 22:48:18 UTC
> On righ-click->"properties" on a file, is the date displayed there correct?

No -  the date is wrong. See screenshot. 
The same invalid date in another FTP server.

I'm sorry I gave wrong info about my desktop environment earlier. I have KDE 4.14.9 not KDE5.
Can I still change date/time format in Qt settings somewhere? Or I have to install Qt5 e.t.c.?
Comment 7 acommi 2016-11-03 01:05:13 UTC
I have just installed Qt5. Now ftp date/time is OK.
But I still try to change short date/time format because Qt5 settings did not pick up my KDE settings. Could you please suggest me where I can do it?
Comment 8 Alex Bikadorov 2016-11-03 14:25:56 UTC
> I have just installed Qt5.
There is a misunderstanding here. If you updated to Krusader 2.5.0 you also had Qt5 and KF5 installed (both are a dependency).

> Now ftp date/time is OK.
Interesting. It should work fine with KDE 4 but looks like there are side effects.

> Could you please suggest me where I can do it?
In KDE5 systemsettings: Personalization->Regional Settings->Formats. This will set the LC_* system variables. See the "locale" command.
Comment 9 Alex Bikadorov 2016-11-03 14:30:54 UTC
Note for myself: 
https://wiki.qt.io/Locale_Support_in_Qt_5#User_Customization_on_Linux
Comment 10 acommi 2016-11-03 14:51:34 UTC
> If you updated to Krusader 2.5.0 you also had Qt5 and KF5 installed (both are a dependency).

Seems it is not true really. Only after I've insalled Qt5 other apps (like Dolphin, Kate etc) became truly Qt5-ed - changed theirs view totally. For example Dolphin has now the same short date format as Krusader (wrong for me).

But there is strange thing  - I still have KDE4 Systemsettings not KDE5, so I can't change Format for Qt5 by its means.
Comment 11 acommi 2016-11-04 14:53:48 UTC
I more thoroughly installed Qt5, then set up Locales. Now everything is OK.
The date format is what I need now.
Thank you

Still, it turns out that when Krusader 2.5.0 is installing on KDE4 it pulls not all dependencies for Qt5.
Comment 12 Alex Bikadorov 2016-11-04 16:19:02 UTC
> Still, it turns out that when Krusader 2.5.0 is installing on KDE4 it pulls not all dependencies for Qt5.

This is a problem with the package you installed.