Directory Indexing Date Format

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
FuriousD
-


Joined: 06 May 2004
Posts: 3

PostPosted: Thu May 06, 2004 8:02 pm    Post subject: Directory Indexing Date Format Reply with quote

Hi... im running v X1 web server and I would like to know if there is a way for me to change the date format in a default directory index.

I have several folders with text files accessible via the web as directory indexes. The date shows up as DD/MM/YYYY. This is confusing to some of the people using these files since they think that it is actually MM/DD/YYYY.

Is there any way to change this date format to MM/DD/YYYY ?

Thanks.
Back to top View user's profile Send private message
nquin321
-


Joined: 29 Jan 2004
Posts: 296
Location: Right Behind You

PostPosted: Thu May 06, 2004 8:53 pm    Post subject: Reply with quote

I do not think there is a way to change the date format for the automatic indexing.

You can always use an autoindexing script like this one:

http://autoindex.sourceforge.net/

http://www.hotscripts.com has others
_________________
How many forum members does it takes to change a light bulb?
Back to top View user's profile Send private message
eznetlinks
-


Joined: 27 Sep 2003
Posts: 144

PostPosted: Thu May 06, 2004 9:13 pm    Post subject: Reply with quote

Use this as your index file.

index.php

<?php
echo '<table width=400pxl>
<tr><td><u><b>File</b></u></td>
<td><u><b>Last Modified</b></u></td></tr>';
if ($folder = opendir('.')) {
while (false !== ($file = readdir($folder))) {
if ($file != "." && $file != "..") {
echo "<tr><td><a href=$file>$file</a></td><td>";
echo date ("F d Y H:i:s.", filemtime($file));
echo "</td></tr>\n";
}
}
closedir($folder);
}
echo "</table>";
?>
Back to top View user's profile Send private message Visit poster's website
FuriousD
-


Joined: 06 May 2004
Posts: 3

PostPosted: Fri May 07, 2004 4:50 pm    Post subject: Reply with quote

thanks, i'll try

Do i need to install anything to use PHP? never used it be4...
Back to top View user's profile Send private message
FuriousD
-


Joined: 06 May 2004
Posts: 3

PostPosted: Fri May 07, 2004 5:22 pm    Post subject: Reply with quote

nevermind...
Back to top View user's profile Send private message
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Fri May 07, 2004 6:08 pm    Post subject: Reply with quote

Would it not just be easier for Aprelium to change to the international data format for directory indexing?

YYYY-MM-DD

http://www.w3.org/QA/Tips/iso-date
_________________
Olly
Back to top View user's profile Send private message
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Fri May 07, 2004 6:25 pm    Post subject: Reply with quote

And that's backwards why ? It would be easier for Aprelium to leave it alone, obviously, since changing involves work. As it stands currently, it produces logs in the Common Logfile Format, meaning the logs can be interpreted easily by many different applications, you want it broken ?
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun May 09, 2004 1:10 pm    Post subject: Reply with quote

olly86,

The directory indexing in the next version will have many features and will offer many parameters (such as the date format.)
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group