0
<b>Date:</b><span t-esc="time.strftime('%d-%m-%Y %H:%M:%S')"/>

This is my attempted code.I want to print current date and time in the report page.I live in India and our timezone is 5.30 hrs ahead of GMT.I already changed timezone in odoo user settings.But still it is printing time in GMT and not in IST(GMT+5.30)

Kiran
  • 1,481
  • 6
  • 36
  • 66

1 Answers1

1

Checkout this module https://apps.openerp.com/apps/modules/8.0/qweb_usertime/ it adds an extra tag for you to specify the time of the report based on the usertime, internally it uses the pytz module

so you can roll your implementation if you don't want to install it, this is how you'll use it in your case

<b>Date:</b><span t-usertime="%Y-%m-%d %H:%M:%S" />
danidee
  • 9,298
  • 2
  • 35
  • 55
  • Its working but time is printing like this 17-46-13(h-m-s) I want to print time using : (colon) as separator – Kiran Jul 11 '16 at 12:20