My users are annoyed with the time shift of postings on a Squishdot site. The users are in the U.S. and the server is in the Netherlands (FreeZope.org, a truly wonderful thing). The DTML code in Squishdot that displays the date appears to be a date field in the posting object. E.g., the code is: <dtml-var date_posted> What I want to do is recalculate the date_posted and shift the time back about five hours. I tried: <dtml-let old_date=date_posted new_date="old_date - 0.25"> <dtml-var new_date> </dtml-let> But the server returned an error regarding the use of the minus sign. Does anyone have any hints? Thanks in advance, Ron
On Fri, May 10, 2002 at 04:36:47PM +0000, complaw@hal-pc.org wrote:
<dtml-var date_posted>
What I want to do is recalculate the date_posted and shift the time back about five hours.
grep through the Squishdot source code and you'll see that date_posted is a method in Posting.py -- it returns a string, so you can't do any manipulations with it out of the box. I have a patch on Squishdot's Sourceforge site (http://sourceforge.net/tracker/index.php?func=detail&aid=502917&group_id=108...) that provides user-defined date formats, among other things. I may get it into a separate CVS branch of Squishdot once I'm done with some other projects. If you needed a one-off solution, you could edit Posting.py and change the date format to whatever you want, or change timezones, etc. If you don't have filesystem access, this probably isn't an option. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
participants (2)
-
complaw@hal-pc.org -
Mike Renfro