openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #27628
[Bug 1308091] [NEW] event recurrence over DST boundary doesn't shift to match local time
Public bug reported:
This error is repeatable over any trunk/saas/7.0 version. You may have to avoid other unrelated javascript bug in one version or the other to actually manage to follow the steps to reproduce (on saas you can safely ignore them, not so sure for trunk, and it doesn't barf in good ol' 7.0). But the 3 version will be able to reproduce the bug.
Steps to reproduce
------------------------
1 - Go to Calendar
2 - Create an event, a recurrent one, over a DST (Daylight Saving Time) change (for example, in france timezone, your could try 27 of march spanning 10 days). Choose a specific time as 8:00 in the morning. Make sure you start before the DST boundary AND finish after.
3 - After the DST boundary, the time won't be 8:00 anymore
What I'm expecting:
------------------------
My appointement are at 8:00 o'clock in my timezone, this whatever the
DST is. I don't want to see all my timetable of recurrent event being
shifted one hour.
Analysis
-----------
this happens in ``calendar/calendar.py``. And using ``rrulestr`` from
``dateutil`` package, you fall in the DST nightmare in python.
Feeding the rrulestr with the startdate that was shifted to the correct
pytz, you should know that pytz timezone are fixed and depends on the
current datetime being localized. So the ``rrulestr`` is copying this
timezone (which doesn't use DST) to all the event it generates. So the
times are incorrect.
One way to go through it is to annhiliate the tzinfo in the datetime
being generated and Re-ask for localization...
I will submit a suggestion to correct this in a few instant.
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1308091
Title:
event recurrence over DST boundary doesn't shift to match local time
Status in OpenERP Addons (modules):
New
Bug description:
This error is repeatable over any trunk/saas/7.0 version. You may have to avoid other unrelated javascript bug in one version or the other to actually manage to follow the steps to reproduce (on saas you can safely ignore them, not so sure for trunk, and it doesn't barf in good ol' 7.0). But the 3 version will be able to reproduce the bug.
Steps to reproduce
------------------------
1 - Go to Calendar
2 - Create an event, a recurrent one, over a DST (Daylight Saving Time) change (for example, in france timezone, your could try 27 of march spanning 10 days). Choose a specific time as 8:00 in the morning. Make sure you start before the DST boundary AND finish after.
3 - After the DST boundary, the time won't be 8:00 anymore
What I'm expecting:
------------------------
My appointement are at 8:00 o'clock in my timezone, this whatever the
DST is. I don't want to see all my timetable of recurrent event being
shifted one hour.
Analysis
-----------
this happens in ``calendar/calendar.py``. And using ``rrulestr`` from
``dateutil`` package, you fall in the DST nightmare in python.
Feeding the rrulestr with the startdate that was shifted to the
correct pytz, you should know that pytz timezone are fixed and depends
on the current datetime being localized. So the ``rrulestr`` is
copying this timezone (which doesn't use DST) to all the event it
generates. So the times are incorrect.
One way to go through it is to annhiliate the tzinfo in the datetime
being generated and Re-ask for localization...
I will submit a suggestion to correct this in a few instant.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1308091/+subscriptions
Follow ups
References