I'm pretty new to Zope and am trying to sort results by time. I have a perfectly working <dtml-in> that is going through files and g them in reverse but I would like to filter out ones older than 10 days... I've tried: <dtml-if "bobobase_modification_time < '2003/09/30 15:11:04.697 GMT-4'"> New message posted after '2003/09/30 15:11:04.697 GMT-4'<br> <dtml-else> old message posted before '2003/09/30 15:11:04.697 GMT-4'<br> </dtml-if> But it definately isn't comparing the times properly. Katie Legere Kingston Frontenac Public Library
Katie Legere wrote at 2003-10-10 10:28 -0400:
I'm pretty new to Zope and am trying to sort results by time. I have a perfectly working <dtml-in> that is going through files and g them in reverse but I would like to filter out ones older than 10 days... ... <dtml-if "bobobase_modification_time < '2003/09/30 15:11:04.697 GMT-4'"> ...
But it definately isn't comparing the times properly.
"bobobase_modification_time" is a method. Use "bobobase_modification_time()". Do not compare it with a string but with a "DateTime" object ("_.ZopeTime(timestring)" in DTML). Dieter
participants (2)
-
Dieter Maurer -
Katie Legere