appy.pod: solved bug https://bugs.launchpad.net/appy/+bug/719270; appy.gen: bugfix in Date intervals coming from search.pt.

This commit is contained in:
Gaetan Delannay 2011-02-15 13:27:36 +01:00
parent 1bb4dbf20a
commit 91c657238d
7 changed files with 1711 additions and 1704 deletions

View file

@ -558,12 +558,15 @@ class ToolMixin(BaseMixin):
if setMin: day = 1
else: day = 31
DateTime = self.getProductConfig().DateTime
# Set the hour
if setMin: hour = '00:00'
else: hour = '23:59'
# We loop until we find a valid date. For example, we could loop from
# 2009/02/31 to 2009/02/28.
dateIsWrong = True
while dateIsWrong:
try:
res = DateTime('%s/%s/%s' % (year, month, day))
res = DateTime('%s/%s/%s %s' % (year, month, day, hour))
dateIsWrong = False
except:
day = int(day)-1