wrong times on sign in/sign out
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned |
Bug Description
When a employee does "sign in" or "sign out" , the list view of attendance doesn't display the correct times .
In the other hand in the report "Attendance error report" the 'date signed' field appears correct but the 'date recorded' field is wrong.
the timezone of my server is " (UTC) Dublin, Edinburgh, lisbon, London " - Windows 7
the client side is the same " (UTC) Dublin, Edinburgh, lisbon, London " - windows 7 too
example:
The employee signs in at 9:00 AM Lisbon.
in the list view of attendance appears - 10:00 AM
in the database , on table hr_attendance
the 'create_date' field - 8:00 AM - The correct time in UTC
the 'name' field - 9:00 AM - The correct time in lisbon
if i create the report with timezone preference in blank the result is this:
in the Attendance error report
if i create the report with timezone preference "Europe/Lisbon" the result is this
in the Attendance error report
So the 'name' field is saved in my server's timezone is saved as a timestamp with no timezone information, but which is already offset to GMT. Then the offset is applied again for some reason. The create_date shows the correct time in UTC because it may be managed by openERP itself. I'm not sure.
-------
Solution
in the module hr_timesheet_sheet .
file - hr_timesheet_
class -class hr_attendance(
method - def _get_default_
change the line :
return time.strftime(
to
return datetime.
affects: | hr-timesheet → openobject-addons |