Comment 6 for bug 918257

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote : Re: [Bug 918257] Re: openerp-web always uses the same (wrong) time zone

On 01/26/2012 01:11 PM, Raphaël Valyi - http://www.akretion.com wrote:
> I had to set it UTC and this is not the default configuration because by
> default Postgres takes the timezone of the OS (which is not UTC here).
> So was that expected by you? Wouldn't be better to force the UTC timezone
> in the Python connection to Postgres?

Quoting my previous comment:
"the timezone of the DB connection is therefore *irrelevant by design*."

So I would say no, what you describe is not expected. And no, it would
not be better to force UTC on DB connections. Changing the DB timezone
is not supposed to modify the 6.1 behavior, so if it did for you, that
means there's a possible bug somewhere. Forcing the database connection
timezone in the hope that it will solve a bug would not be a good
idea... in fact, not forcing it could even help spot potential bugs, or
so it seems.
You're assuming we use the database's "now()" to initialize new record
values, but that's not the case. Please grep the codebase if you don't
trust me on this.

If you have the time, I think it's worth analyzing further, so that we
know whether something obvious is missing in the 6.1 design or not.
Please don't assume the system works in one way or another, rather read
my description and get the full facts such as: based on standard OpenERP
addons, what datetime values were actually stored in the database (type
and value), what was read, written, transmitted, displayed, and with
which timezone settings in the server and client OS, user prefs, etc.
Without this information it's very hard to tell what is wrong in your case.

Thanks for your feedback!