-
Notifications
You must be signed in to change notification settings - Fork 47
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? #42
Comments
odoo.env.user.tz = 'Asia/Shanghai' |
You say that responses are UTC, what kind of RPC calls do you do? |
@dfang thanks but response also UTC. |
@sebalix I'm using |
I mean, do you use |
@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. |
@sebalix Can it be fixable? |
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. |
This issue was moved to OCA/odoorpc#8 |
I add that line:
But any datetime responses also UTC.
The text was updated successfully, but these errors were encountered: