Page 1 of 2

wrong date with drag and drop

Posted: 08 May 2020 12:57
by Raphael
Hello

since the last update, any time in drag and drop a file, the file date (date modified is very wrong. See attached screenshot
The first file was dragged and dropped from an Outlook attachment

This only happens when the drop is made in the XYplorer window (see new example screenshot 2)
when the same file is dropped in the same directory (downloads) but in Windows Explorer window, all is fine (see screenshot 3)

As this is very unpleasant, please let me know how to
1. avoid this from happening again
2. correct all the files that have crazy dates

thank you
Best regards
Raphael

Re: wrong date with drag and drop

Posted: 08 May 2020 13:23
by highend
How to avoid that? Mh, don't know.

How to fix those dates? Scripting...
It finds all files recursively in the current folder of the list pane
and if their date is in the future compared to now(), it will reset their modified date to the time when the script was started...

Code: Select all

$items = quicksearch("/f", , , "sm");
    $now   = now("yyyy-mm-dd hh:nn:ss");

    $filesToCorrect = "";
    foreach($item, $items, <crlf>, "e") {
        $file  = gettoken($item, 1, "|", "t");
        $mDate = formatdate(gettoken($item, 3, "|", "t"), "yyyy-mm-dd hh:nn:ss");
        $diff  = datediff($mDate, $now, "s");
        if ($diff <= -1) { $filesToCorrect .= $file . <crlf>; }
    }
    if ($filesToCorrect) {
        timestamp "m", $now, trim($filesToCorrect, <crlf>, "R");
    }


Re: wrong date with drag and drop

Posted: 09 May 2020 11:09
by admin
"...since the last update" Which version did you use before?

Re: wrong date with drag and drop

Posted: 09 May 2020 11:47
by Raphael
thank you for following up on my problem

I currently use v 20.90.0300
I have installed it immediately upon receipt of the message inviting me to install the update.
I do not remember which version I had before but as I am always installing update as soon as I see the invitation to update, I assume that the previous version was truly the last one before the current one. I hope this helps you identify which one I had before the current one.

I have never had this problem until this version

Re: wrong date with drag and drop

Posted: 10 May 2020 16:20
by admin
It's a long time ago that anything related to this issue has been changed in the app, that's why I asked. So I assume something else is responsible...

Re: wrong date with drag and drop

Posted: 10 May 2020 17:37
by Raphael
fair enough. it might be due to the changes that Microsoft has made to Office 365 that has now become Microsoft 365.

Fixing past problems can be done with a program called Attribute Changer 9. So let's forget fixing the past

As it happens whenever I drag and drop attachments from Outlook, the remaining problem is... how can this be prevented from now on?

Re: wrong date with drag and drop

Posted: 10 May 2020 18:08
by admin
XY is currently in a transition phase to 64-bit. It's quite pointless to look into this now because it's likely to be affected by bitness.

I wonder why no other users report this though. So I still think it might be something peculiar to your system.

Re: wrong date with drag and drop

Posted: 11 May 2020 03:26
by RalphM
I usually save attachments via "Save As" which doesn't show the problem but just tested DnD now and created a very futuristic file (year 4051).
So I can confirm this with my specs (see signature).

Re: wrong date with drag and drop

Posted: 11 May 2020 07:47
by admin
Can you also confirm that this worked better in the previous version?

Re: wrong date with drag and drop

Posted: 11 May 2020 10:20
by Raphael
Additional piece of information:

the two dates I get with drag and drop are with 4051 (like RalphM) before being converted to 19.01.2038 04:14

At the moment of the drop, the year that is displayed is 4051 (I do not have time to see the day and month) but within half a second, that date is spontaneously changed into 19.01.2038 (like if it was recalculated as an interpretation of the previous data that appears in that field).

All my drag & drop files now show 19.01.2038

Re: wrong date with drag and drop

Posted: 11 May 2020 10:25
by highend
The recalculation is done because a 32-bit value date ends on 2038-01-19 (and XY is atm a 32-bit app only)

Re: wrong date with drag and drop

Posted: 11 May 2020 10:33
by Raphael
highend wrote: ↑11 May 2020 10:25 The recalculation is done because a 32-bit value date ends on 2038-01-19 (and XY is atm a 32-bit app only)
thank you for this clarification. I hope it helps the programmers figure out the bug

I also thank you for the script to correct the date.
I had managed to change the date with Attribute Changer 9 program.

Re: wrong date with drag and drop

Posted: 11 May 2020 11:52
by admin
In the next beta please do the drag-n-drop, then check the debug log via script dlog; in address bar. Look for a log entry called ftLastWriteTime and show it here.

Re: wrong date with drag and drop

Posted: 11 May 2020 17:34
by RalphM
Here you are:

Code: Select all

Debug Log
XYplorer 20.90.0301  -  Windows 10 Windows 8, 64-bit, Release 1909, Build 18363.778  -  2020-05-12 01:31:44.100

XYplorer 20.90.0301  -  Windows 10 Windows 8, 64-bit, Release 1909, Build 18363.778  -  2020-05-12 01:31:44.100
----------------------------------------------------------------------------------------------------

           -  2020-05-12 01:30:57.918  ---  ftLastWriteTime: 91515139200000 -> 1/01/4501 10:00:00

Re: wrong date with drag and drop

Posted: 11 May 2020 18:30
by admin
What would have been the correct date?