For some odd reason, <b tal:replace="here/bobobase_modification_time"/> returns a string like "2002/05/27 15:44:11.431 GMT-7". Now, this would normally be acceptable, except I'm in GMT -8!! Is there a way I can change that GMT offset? Also, is there a way I can change the bobobase formatting? (ie hh:mm DD/MM/YY GMT). I found documentation for DTML but not for ZPT formatting, and my experiment at using similar style formatting failed =)
At 3:17 PM -0700 5/28/02, Ian McMeans wrote:
For some odd reason, <b tal:replace="here/bobobase_modification_time"/> returns a string like "2002/05/27 15:44:11.431 GMT-7". Now, this would normally be acceptable, except I'm in GMT -8!!
Except that you are not because all the GMT-8 time zones are currently observing one hour of DST (except Pitcairn Island, which I doubt is where you are posting from ;-)). Hence GMT-7.
Is there a way I can change that GMT offset? Also, is there a way I can change the bobobase formatting? (ie hh:mm DD/MM/YY GMT). I found documentation for DTML but not for ZPT formatting, and my experiment at using similar style formatting failed =)
I think they are DateTime objects so you could write a little Python script to return the string you want. <b tal:replace="here/bobobase_modification_time/myTimeFormat"/> or something. HTH, - rmgw <http://www.trustedmedianetworks.com/> ---------------------------------------------------------------------------- Richard Wesley Trusted Media Networks, Inc. "Does anybody really know what time it is? Does anybody really care?" - Chicago
On Tue, May 28, 2002 at 03:17:55PM -0700, Ian McMeans wrote:
Is there a way I can change that GMT offset? Also, is there a way I can change the bobobase formatting? (ie hh:mm DD/MM/YY GMT). I found documentation for DTML but not for ZPT formatting, and my experiment at using similar style formatting failed =)
I don't know the original author for this snippet (possibly peterbe), since zope.org wasn't accessible for me a moment ago, but here's what I'm using: <span tal:replace="python:template.bobobase_modification_time().strftime('%Y/%m/%d %-I:%M %p')">YYYY/MM/DD HH:MM:SS</span> That's in my standard_template.pt, and gives me the last modification time on whatever Page Template I'm rendering. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
participants (3)
-
Ian McMeans -
Mike Renfro -
Richard Wesley