Commit c34f9bff authored by Alexandre Boeglin's avatar Alexandre Boeglin

Convert the date to the user provided timezone, also change the test to use

another timezone than UTC.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18358 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dbb3d22c
...@@ -415,4 +415,7 @@ class Alarm(XMLObject, PeriodicityMixin): ...@@ -415,4 +415,7 @@ class Alarm(XMLObject, PeriodicityMixin):
periodicity_start_date = self.getPeriodicityStartDate() periodicity_start_date = self.getPeriodicityStartDate()
if alarm_date < periodicity_start_date: if alarm_date < periodicity_start_date:
alarm_date = periodicity_start_date alarm_date = periodicity_start_date
# convert the date to the user provided timezone
alarm_zone = periodicity_start_date.timezone()
alarm_date = alarm_date.toZone(alarm_zone)
return alarm_date return alarm_date
...@@ -58,7 +58,7 @@ class TestAlarm(ERP5TypeTestCase): ...@@ -58,7 +58,7 @@ class TestAlarm(ERP5TypeTestCase):
quantity = 10 quantity = 10
base_price = 0.7832 base_price = 0.7832
# year/month/day hour:minute:second # year/month/day hour:minute:second
date_format = '%i/%i/%i %i:%i:%d UTC' date_format = '%i/%i/%i %i:%i:%d GMT+0100'
def getTitle(self): def getTitle(self):
return "Alarm" return "Alarm"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment