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.

3

Current Date in QWEB Report with user timezone

By
Felipe
on 2/13/15, 6:48 PM 6,301 views

how can I get the current date with the correct timezone of the user printing the report?

I am using this, but this brings the current UTC time.
<span t-esc="time.strftime('%Y-%m-%d %H:%M:%S')"/>

8
Vince Vinet
On 4/23/15, 3:52 PM

I have just created a module which allows you do to:

<span t-usertime="%Y-%m-%d %H-%M-%S" /> 

and get the correct timezone. See it on GitHub 

This has now been accepted in the OCA addons. Updated the github link.

Savoir-Faire Linux, Vince Vinet
on 5/11/15, 10:06 AM

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

5 follower(s)

Stats

Asked: 2/13/15, 6:48 PM
Seen: 6301 times
Last updated: 6/14/16, 9:35 AM