openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #09334
[Bug 932584] Re: OpenERP 6.1rc1 emits working hours as local
Hi Stuart,
Your analysis looks sound and indeed we have to perform the task
scheduling on a consistent set of input data: either we convert all
input to UTC before scheduling, or we convert everything to a certain
local time and then convert the output back to UTC before persisting
into the database.
In any case it seems that have a working time that spans midnight is a
possible situation, e.g. teams working in 3x8 shift pattern, so fixing
Faces to support it properly is great!
Thanks for providing an in-depth analysis, a corresponding set of
patches, and also for the upstream submission!
PS: the patches and related merge proposal still have to be reviewed,
but currently the MP seems to contain unrelated changes, see my comment
on it.
** Changed in: openobject-addons
Importance: Undecided => Medium
** Changed in: openobject-addons
Status: Incomplete => Confirmed
** Changed in: openobject-addons
Assignee: (unassigned) => OpenERP R&D Addons Team 1 (openerp-dev-addons1)
--
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/932584
Title:
OpenERP 6.1rc1 emits working hours as local
Status in OpenERP Addons (modules):
Confirmed
Bug description:
When OpenERP generates resources for import into faces for resource
levelling, it emits the times as local time, while emitting and
interpreting UTC times for the task start and end dates. This leads
to funny offsets in the resultant data.
Attached are two patches:
0002-resource-Convert-working-hours-to-UTC.patch is a rewrite of
resource.resource.calculate_working_calendar, which is time-zone
aware.
In doing this, I discovered that Faces does _not_ like working hours
that span midnight. (Our working hours are 0900-1700, and our local
time zone is UTC+10, leading to working ours of 2300-0700 UTC.) Thus,
I have attached a second patch: 0001-faces-Fix-24-hour-and-end-at-
midnight-timespans.patch which corrects this behaviour.
The patch to faces has been submitted upstream:
https://sourceforge.net/tracker/?func=detail&aid=3487769&group_id=155221&atid=794937
Known issues:
- It assumes the user's local time zone, not the time zone of the resource
- It may break slightly where daylight savings time is involved.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/932584/+subscriptions
References