[Zope] Use of last_modified

Martijn Pieters mj@antraciet.nl
Mon, 04 Oct 1999 07:58:40 +0200


At 02:50 4-10-99 , Don Porter wrote:
>Hmmm.  That's a step closer.  Now I get a date, but it doesn't seem to
>correspond to the last modification time of any of the objects
>(index_html, standard_html_header, standard_html_footer, or any of
>the images) which make up the page.
>   Is it taking an average?

It will only correspond to the last modification time of the called object.

With DTML Documents and Files and such, that is the last modification time 
of any of the attributes of the object itself (so, any changes to the DTML, 
or the properties on the property sheet). It won't take into account any of 
the objects called from you method, like standard_html_header and -_footer.

With DTML Methods, the story is even more complex. When a DTML Method is 
called, and it renderers it's DTML, its sense of 'self' is not the DTML 
Method object, but the object it is called upon, usually a Folder (wich is 
what index_html named DTML Methods are for, for example). So when the DTML 
calls a method like bobobase_modification_time, it's called on its parent, 
and so the modification time its parent is shown.

>The formatting isn't right either:
>
>         Last modified: 1999/10/03 13:38:8.30297 US/Pacific
>
>                                         ^-  Why "8" not "08" ?

This I explained in my other email =).



>Also, is there a similar documentation problem with the "get_size"
>variable?

get_size is a method only defined by DTML Method and DTML Document objects, 
but if you try and call it from a DTML Method, Zope will not find it, 
because the DTML Method object itself is not searched for the method.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| T: +31 35 7502100 F: +31 35 7502111
| mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
---------------------------------------------