Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Time spent between 00:00:00 and 01:59:59 appear on the day before

By
flg
on 7/23/14, 9:41 AM 1,015 views

Hello

When declaring time spent over task. I figured out that if the time of the date on which we declare the time is comprised between  00:00:00 and 01:59:59 (included) then the time declared appear on rthe day before when looking at "Reporting>Timesheet analysis"

Example: 2 hours entered on a task at the date October, 5th at 01:15:00 appear in the report as 2 hours spent on the October 4th.

This is not coherent and is priobably not the expected behaviour.

I can not force my users to specifiy a time (we do not care at which time exactly was the task done). How to tackle this issue? Raise a bug ? And if se, how to make it ?

I am on v8 RC1 on Ubuntu server 14.04. Can anybody reproduce this ?

Franck

 

 

1

Bole

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 7/25/14, 4:06 AM

Time zones and server setup is the topic you should read about.. 
Short version: server should always be in UTC time, users should have time zone set up corectly,
Server will always write time and datetime records in UTC without timestamp... and recalculate in current user timezone on view rendering.

My guess is that your server time is something like GMT +1 or GMT+2 ( or any timezone with this characteristic)... 
To check that info, go to console and type: date +%Z  
and if it is not UTC you can change it by typing : sudo dpkg-reconfigure tzinfo

 

read more on this subject 
 

0
flg
On 7/27/14, 4:07 AM

Thanks for having taken the time to answer.

I set the server timezone as UTC as suggested. This may impact the postgresql server timezone which use by default the server's one (timezone = 'localtime' in the postgresql config file).

-> The problem is still present

I also changed the config file of postgresql from timezone = 'localtime' to timezone = 'UTC' and results are the same

Practical example based on my current configuration:

 

The server is set as UTC, the postgresql is set as the server, the user's client is in CEST (UTC+2) and the users' timezone preference is set as Europe/Paris in OpenERP.

In that configuration, entering a time record in task on the 26/06/2014 00:00:00 makes it appearing on the 25/06/2014 in the timesheets and create a record in the table project_task_work at 25/06/2014 22:00:00.

The record in the DB looks OK (-2 hours compared to what I entered which corresponds to the time difference between user local time (CEST) and UTC time. The issue looks like to be when generating the timesheets.

 

I also looked at the links you provided: they relate to comparable issues but none of them was solved, except by using unsatisfying local patches.

Franck

 

I opened an 'issue' on github and it is likely to be confirmed as a bug. See here: https://github.com/odoo/odoo/issues/1349#issuecomment-50278551

flg
on 7/28/14, 3:27 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/23/14, 9:41 AM
Seen: 1015 times
Last updated: 3/16/15, 8:10 AM