-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set timezone? #8
Comments
From @dfang on February 22, 2017 6:54 odoo.env.user.tz = 'Asia/Shanghai' |
You say that responses are UTC, what kind of RPC calls do you do? |
I mean, do you use |
From @mrgaolei on February 22, 2017 10:6 @sebalix import odoorpc
odoo=odoorpc.ODOO()
odoo.login('odoo_v9', 'admin', 'password')
odoo.env.context['tz']='Asia/Shanghai'
S=odoo.env['sale.order']
S.browse(1) response: {
"xxxx": "xxxx",
"date_order": "2017-02-01 00:00:00"
} But in Odoo web UI, it OK, shown as |
Thanks for the example, I will try to figure out what is happening here. |
I don't check yet. If you have time to do this, you could check the JSON value returned in your web browser when you navigate on the Odoo UI. If the raw value is not converted this means that it is the web client which convert it, not the server. This will help to do the right fix. |
From @mrgaolei on February 14, 2017 10:39
I add that line:
But any datetime responses also UTC.
Copied from original issue: osiell/odoorpc#42
The text was updated successfully, but these errors were encountered: