[Erp5-report] r25502 - /erp5/trunk/products/ERP5/Document/Alarm.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Feb 10 05:34:45 CET 2009
Author: yusei
Date: Tue Feb 10 05:34:44 2009
New Revision: 25502
URL: http://svn.erp5.org?rev=25502&view=rev
Log:
Fixed a bug which causes infinite loop if periodicity steps over the summer time start date or end date(ex. 2008/10/27 00:00 CET). DateTime.strftime method does not work as we expected. We expect that DateTime('2008/10/27').strftime('%d') returns 27, but it returns 26 in reality. Because "2008/10/27 00:00 GMT+1" equal to "2008/10/26 23:00 GMT+2".
Modified:
erp5/trunk/products/ERP5/Document/Alarm.py
Modified: erp5/trunk/products/ERP5/Document/Alarm.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Alarm.py?rev=25502&r1=25501&r2=25502&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Alarm.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Alarm.py [utf8] Tue Feb 10 05:34:44 2009
@@ -182,7 +182,7 @@
if not(validate_day and validate_week and validate_month):
# We have to reset hours and minutes in order to make sure
# we will start at the beginning of the next day
- next_start_date = DateTime(next_start_date.strftime('%Y/%m/%d') + ' 00:00:00 %s' % next_start_date.timezone())
+ next_start_date = DateTime(next_start_date.Date() + ' 00:00:00 %s' % next_start_date.timezone())
next_start_date = addToDate(next_start_date, day=1)
else:
# Everything is right, but the date is still not bigger
More information about the Erp5-report
mailing list