Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
1972 Vues

Hi, 


In stock.picking, we have the  field "scheduled_date" that is computed based on date in move lines.

as you know, In DB it's always UTC  and then Odoo tries to convert the date based on user's Timezone.


SO if in db it's 2022-02-02 14:00:00 and the user has europe/Paris timezone, the user will see
2022-02-02 16:00:00 in scheduled date.

i tried to search in Odoo where it converts the time based on timezone in order to disable it for this specific field and couldn't find it.

Question: Can someone help and tell me where/how can i disable time convertion for this specific field ? 


Thank you.

Avatar
Ignorer
Meilleure réponse

Hi Ibrahim Boudmir

You can find timezone field in user profile, but the time ( scheduled_date ) will appear depending on browser timezone.

Avatar
Ignorer
Auteur

timezone field in user profile must remain the same.
I only want to have UTC timezone for field "scheduled_date"

Meilleure réponse

Try to find what is current user's timezone and then convert that time to the system user profile timezone after that odoo will automatically store that time in the UTC time zone in DB.

So from the current user's screen, he will see time based on the system user profile timezone.

Avatar
Ignorer
Auteur

if i understand well,
1- get odoo user profile timezone
2- convert it to UTC
right ?

If yes, I already did it and still get sheduled_date in odoo user profile timezone and not utc.