Something strange with On-Rev

Alex Tweedly alex at tweedly.net
Sat Dec 11 18:43:32 EST 2010


That's just the way "ls -l" works .....

if the modification date is a while ago, words 6 - 8 contain the date, 
month and year
if the modification date is recent enough, words 6 - 8 contain the date, 
month and time

e.g.
> drwx------+  26 alextweedly  staff     884  7 Dec 22:52 Desktop
> drwx------+   3 alextweedly  staff     102  4 May  2010 Movies
> drwx------+   4 alextweedly  staff     136  5 May  2010 Music
> drwx------+   7 alextweedly  staff     238 15 Sep 20:46 Pictures


I'd use "the detailed files" rather than messing with "ls -l"

-- Alex.

On 11/12/2010 17:09, Medard wrote:
> I encounter a strange thing: at the footer in my web pages, I put a
> notice stating the last modification date.
>
> This date is calculated on the server, with a dedicated procedure
> (Thanks to Sarah :-))
>
> ===script===
>
>          -- get the path to the page just loaded
>          put $_SERVER["PATH_TRANSLATED"] into tPath
>
>          -- use the ls shell command to get the details for this file
>          put shell("ls -l "&  quote&  tPath&  quote) into tListing
>
>          put line 1 of tListing into tFileData
>
>          -- remove the excess data
>          delete word 1 to 5 of tFileData
>          replace tPath with empty in tFileData
>
>          put word 2 of tFileData into tjour
>          put word 1 of tFileData into tmois
>          put word 3 of tFileData into tannee
>
>          put "Modif. Medard"&&  tjour&&  tmois&&  tannee
>
> =========
>
> this procedure is called in the footer as an include:
>
> <?rev include "includes/modif.irev" ?>
>
> On the "interior" web pages, the date is OK:
>
> Modif. Medard 30 Nov 2009
>
> But i get this on the home page:
>
> Modif. Medard 11 Dec 10:30
>
> ?
>
> Any idea?
> That said, it is only a cosmetic big ;-)
> I wonder myself the very same procedure gives two different results,
> depending on the position in the directory hierarchy...
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the Use-livecode mailing list