Archived Forum Post

Index of archived forum posts

Question:

FTP2 reporting wrong timestamp

Apr 11 '13 at 11:43

The Last Modified timestamp being reported by the ftp2 component is incorrect. It looks like the component is defaulting a timezone offset of -12 hours for the value it gets back from the server.

Here is the directory listing as shown in the SessionLog:

(DirListingCharset: utf-8)
read listing success = 1, listing size = 242
04-01-13  02:43PM       <DIR>          ftpuser
03-28-13  02:12PM       <DIR>          source
03-29-13  11:36AM       <DIR>          source2
03-30-13  03:57PM       <DIR>          target
04-10-13  12:07PM                   33 t123456.txt
226 Transfer complete.

When I retrieve the timestamp for the "t123456.txt" file, I get these results, none of which is correct:

GetLastModifiedTimeStr: Thu, 11 Apr 2013 00:07:00 -0400
GetLastModDt.GetAsDateTime(false): 4/11/0413 4:07:00 AM
GetLastModDt.GetAsDateTime(true): 4/11/0413 12:07:00 AM
GetLastModifiedTime: 4/11/2013 12:07:00 AM

The CkDateTime returned by GetLastModDt has a UTC offset of -14400.

It seems like the component should just be reporting back the value it gets from the server without doing timezone interpretation, since timezone information isn't reported by the server.

Note that the calls to GetLastModDt.GetAsDateTime are returning a DateTime value that has the wrong year (0413).


Accepted Answer

This is probably a problem that is fixed in the latest pre-release. I can provide a new build for testing, however, I don't know your programming language, operating system, platform (32-bit/64-bit), if Windows, then .NET Framework version? MSVC++ version, etc.?


Answer

See the answer here: http://www.chilkatforum.com/questions/3020/ftpsftp-timestamps

Also, make sure you are using the latest version of Chilkat, just in case there were problems relating to this topic that have been fixed.