Click to See Complete Forum and Search --> : file time-date help


Youbecha
02-01-2003, 02:22 PM
I have searched quite a bit on this forum, but only found one thread that came close to answering my question...and it was off topic.

Anyway, I ftp pictures to a server off a webcam, then have the web page pull up the pics...the files them selves are auto renumbered everytime a new one is posted, so picture number 1 is always the most recent etc.

Each of these picture files has a time and date stamp that I can see when I do an ftp to the site.

Here is the question,

Is there any way to retrieve that time date info and post it...and more than that, can you do some math on that info?

I keep an archive of about a week worth of pictures, and I would like to be able to see the current time...then on the archive pages, see the time those pictures were made.

I am not talking timestamp on the pictures themselves, I already have that, but I use pages of thumbnails to pull up the actual pictures, and you cannot see the timestamp on the thumbnail.

for example the last page of the archive has pictures from 48 to 71 hours old...I would rather say that these pictures were from 5am on the 6th to 10pm on the 9th or whatever.

That is where the math comes in, if I have the time in a useable format, I can subtract 48 hours off it and get the archive page time. (everytime the pictures are updated, they all get modified and renumbered...so always show the latest time on the file)

Any info would help...

Thanks

Zach Elfers
02-01-2003, 02:39 PM
You could do:

<script type="text/JavaScript">
<!--
document.write(document.lastModified);
//-->
</script>

This will give you the last time that the document was modified but won't give you the info you want about the pictures. It will just give you the document's modification date.

Charles
02-01-2003, 02:42 PM
Zach's method will also fail for a good number of users. What sort of scripting or SSI do you have available on your server?