Posted by Eladio in SWF Studio V3 on May 26 2008, 03:41 pm

Hello,

I'm working with ssCore.FTP.getDirList plugin and I'm detecting an error in the returned file date/time. Sometimes, the year returned by the function is 2007 instead of 2008. The file's date of the function result is just a year prior to the actual date:

server's file date: 26/05/2008 19:56
getDirList date: 26/05/ 2007 19:56

Any ideas why this is happening?

Thanks,

Eladio.


Posted by northcode in SWF Studio V3 on May 26 2008, 04:25 pm

When you get the date from your server are you looking at the creation date or the last modified date? The FTP plugin displays the last write (modified) date of the file.


Posted by Eladio in SWF Studio V3 on May 27 2008, 06:06 am

Tim, thanks for your prompt reply.

In fact, I'm looking for the last modified date, but the plugin, sometimes displays a wrong year (only the year, one prior to the real date). I check the file's date/time in a ftp client -ws_ftp pro- and it's correct 27/05/2008 11:36, but the plugin displays 27/05/2007 11:36.

My flash ftp client doesn't work properly with this behavior. It can't compare the files date/time correctly.

Why?

Thanks a lot,

Eladio.


Posted by northcode in SWF Studio V3 on May 27 2008, 09:37 am

What OS are you seeing this on? We use WinINet's FTP in the FTP plugin and if there's a bug in the date support (not unheard of) then we might be able to get around it or point you at a fix from Microsoft. Can you give us a raw directory list from your server and the results from calling getDirList? Or, even better, can you give us temporary access to your server so we can run some tests?


Posted by Eladio in SWF Studio V3 on May 27 2008, 11:42 am

Tim:

I'm developing the app in Flash CS3/SWF Studio Pro 3.5 (314), running in Win XP (SP-2) and the server runs linux, but there is no problem with that:

This is from msdn about wininet FtpFindFirstFile function:

"Because the FTP protocol provides no standard means of enumerating, some of the common information about files, such as file creation date and time, is not always available or correct. When this happens, FtpFindFirstFile and InternetFindNextFile fill in unavailable information with a best guess based on available information. For example, creation and last access dates are often the same as the file's modification date."

Apparently, there's no solution.

I develop a php script, and I call it via ssCore.HTTP.request and it works... Microsoft fails:mad:

Thanks a lot for a powerfull tool like swf studio,

Eladio.