GetList and wrong modified date

0 votes
asked Oct 11, 2012 by lance (330 points)
edited Mar 11, 2013

I want to get the newest file in a directory and I assume the best way to do that is use GetList on the directory and look at the modified date on each file and then call GetFile on it. The problem is the modified date on each file show as today even though I use another FTP client and it shows the correct modified date. How do I get the actual modified date.

  FtpList files = ftp.GetList();
            string[] arrFiles = new string[files.Count];
            for (int i = 0; i < files.Count; i++)
            {
                arrFiles[i] = files[i].Name + ' ' + files[i].Modified;

            }

1 Answer

0 votes
answered Oct 12, 2012 by Jan Sotola (16,930 points)
edited Mar 11, 2013

There was a bug in versions 2012 R1 and 2012 R2 which caused this behavior when retrieving file listings from AS/400 mainframe servers.

This has been fixed in 2012 R3.

commented Oct 15, 2012 by lance (330 points)
edited Oct 15, 2012

I tried the new hotfix dlls and still have the same issue. I don't get anything back for CreationTime or LastWriteTime and I get the current date and time for Modified.

I tried my older version 3.0.4086 and the modified date and time is still the current time.

I am connecting to a mainframe in case that matters.

commented Oct 15, 2012 by Jan Sotola (16,930 points)
edited Oct 15, 2012

Thank you for your report. We should analyze your situation in more details. Could you, please create a communication log accoding to http://www.rebex.net/kb/logging/

Then please send us the log to support@rebex.net.

commented Oct 15, 2012 by lance (330 points)
edited Nov 1, 2012

Sent the log

commented Nov 2, 2012 by Lukas Pokorny (107,350 points)
edited Nov 2, 2012

This has been fixed in version 2012 R3.

commented Mar 10, 2013 by Phill (100 points)
edited Mar 11, 2013

I have the same problem, and I only recently downloaded the product. So I don't believe this has been fixed.

commented Mar 10, 2013 by Phill (100 points)
edited Mar 11, 2013

Actually my problem is different. The library is working as it should. In my case my devices date and time was set to the incorrect year. Since the FTP server doesn't return a year for this field (thus meaning the current year) the incorrect year was used (and day/month correct). So please disregard previous post ;)

...