Timestamp bug

Think you've found a bug? Post a description here.

Moderator: Serin

Post Reply
mdj
Moderator
Posts: 656
Joined: Mon Aug 18, 2003 4:00 am
Location: Denmark
Contact:

Timestamp bug

Post by mdj » Tue Feb 10, 2004 9:51 am

Hehe, just caught another one! 2.15 Release.

Put an old file in the directory (I used anonymous user, but I guess it won't matter). I have an old file from April 15, 1998. When doing a directory listing, the file date and time are apparently simply transfered as "Apr 15 01:50" instead of "Apr 15 1998" which should be the case, when the file is more than a year old. So, the file is listed as from April 15, 2003. An old file from January 2003 is listed as from January 2004. I see this both when I use IE and the simple ftp.exe as client, so I suppose it is an error in Cerberus, but I could be wrong. I have tried with all different time format settings in Server Manager / Miscellaneous, but that will not fix it.
Morten Due Jørgensen
http://www.mdjnet.dk

User avatar
Serin
Site Administrator
Posts: 1785
Joined: Sat Jan 01, 2005 6:57 pm
Location: United States
Contact:

Post by Serin » Thu Feb 12, 2004 11:07 pm

Thanks, I will look into it.

mdj
Moderator
Posts: 656
Joined: Mon Aug 18, 2003 4:00 am
Location: Denmark
Contact:

Post by mdj » Wed Jul 28, 2004 4:25 am

Any news on this one? I am running 2.2B3, and I still see the problem.
Morten Due Jørgensen
http://www.mdjnet.dk

User avatar
Serin
Site Administrator
Posts: 1785
Joined: Sat Jan 01, 2005 6:57 pm
Location: United States
Contact:

Post by Serin » Fri Jul 30, 2004 4:08 pm

Hello Mdj,

I don't have the source code available at the moment, but I am guessing that I am using the "Last Modified" time as the directory time. Can you check and see when the file is listed as Last Modified? When I am at my development machine, I will look at the source code more closely.

I also need to look into the format the server puts the time in when the file is more than a year old. I have a feeling that I am not properly listing the file.

I will look into both problems and check which time the file should use. I believe I should be listing last modified time, not creation time.

Thanks,

mdj
Moderator
Posts: 656
Joined: Mon Aug 18, 2003 4:00 am
Location: Denmark
Contact:

Post by mdj » Sat Jul 31, 2004 7:32 am

Last modified (write) time would be the right thing to use. When copying a file (using command prompt copy), it apparently gets a new creation time, but not a new write time. When doing a simple dir, the write time is shown. My file in question has write time 24 oct 2001, and creation time 20 july 2004, when list in FTP, it is shown as "Oct 24 19:54", but I would expect "Oct 24 2001" instead. So it appears you choose the right time, but simply forget to format it using the "older than 1 year" format.
Morten Due Jørgensen
http://www.mdjnet.dk

User avatar
Serin
Site Administrator
Posts: 1785
Joined: Sat Jan 01, 2005 6:57 pm
Location: United States
Contact:

Post by Serin » Mon Aug 09, 2004 3:08 pm

Thanks, will resolve the problem in the upcoming 2.2 release.

mdj
Moderator
Posts: 656
Joined: Mon Aug 18, 2003 4:00 am
Location: Denmark
Contact:

Post by mdj » Tue Jan 04, 2005 10:48 am

I see you have indeed done something about this in version 2.22 - but, forgive me for being af pedant, but I believe you have done too much!
:-)
Explanation: The old problem was that timestamps more than a year old was transfered as MMM DD HH:MM instead of MMM DD YYYY causing the client to incorrectly interpret the timestamp as being from within the last year. What you apparently have done to fix this is to transfer the time in the year format, if the year is older than present year, but that is not correct. If the file is from december 2004, it should STILL be transfered using the hour format, as the client will correctly interpret it as last year - and it will until next december, where the file will indeed turn a full year old, and THEN the year format should be used. Having just entered a new year (happy new year, BTW), I noticed all my files from the end of 2004 is listed without the hour stamp. The date shown is not incorrect, but could be a bit more complete.

Am I right?
Morten Due Jørgensen
http://www.mdjnet.dk

User avatar
Serin
Site Administrator
Posts: 1785
Joined: Sat Jan 01, 2005 6:57 pm
Location: United States
Contact:

Post by Serin » Sat Jan 15, 2005 1:51 pm

You are right! There is a bug in the routine that determines if the file is over a year old.


Fixed!

Thanks,

Post Reply