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

How to solve problem with time zone?

By
juan camilo zuluaga serna
on 9/8/14, 4:36 PM 2,834 views

Good day, what happens is that I need to make a search according to the date that begins the day that is 00:00:00 to 23:59:59 the time ends, the problem that occurs is that I I am from Colombia and I like utc 5 hours then sum all records that do from 7pm onwards left me as if they were the next day, as you can solve this problem in advance thank you very much.

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 9/10/14, 3:32 AM

To manage timezones jou need to know how it works and follow few rulez..
1. server MUST be on UTC time no mater what is your local timezone...
--> postgres can hande datetime fields with timezone but odoo always stores datetime as UTC without tz info. orm recalulates time values according to users current timezone settings.
2. if you want to use custom sql to fetch some data than you have to be aware of how odoo handes datetime , and adjust your sql to modify time according to your timezone... you will have a lot of problems if your users come from different timezones, and if your timezone have summer/winter time diff... 
3. there is no easy way of handling it without orm.

 

hope it helps to understand a bit, specialy if you write your own sql... 

0

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 9/9/14, 4:13 AM

Have you tried setting the timezone of the user?  You can go to the Preferences menu and set it there.

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: 9/8/14, 4:36 PM
Seen: 2834 times
Last updated: 3/16/15, 8:10 AM