Skip to content
Snippets Groups Projects
Commit 49604185 authored by Jérémy Hennecart's avatar Jérémy Hennecart
Browse files

[FIX] base: use tz in time only datetime field qweb


We should also use the tzinfo to display only the time of a
datetime.

task-2458013

closes odoo/odoo#78051

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent e43ff93b
No related branches found
No related tags found
No related merge requests found
...@@ -266,7 +266,7 @@ class DateTimeConverter(models.AbstractModel): ...@@ -266,7 +266,7 @@ class DateTimeConverter(models.AbstractModel):
if options.get('time_only'): if options.get('time_only'):
format_func = babel.dates.format_time format_func = babel.dates.format_time
return pycompat.to_text(format_func(value, format=pattern, locale=locale)) return pycompat.to_text(format_func(value, format=pattern, tzinfo=tzinfo, locale=locale))
if options.get('date_only'): if options.get('date_only'):
format_func = babel.dates.format_date format_func = babel.dates.format_date
return pycompat.to_text(format_func(value, format=pattern, locale=locale)) return pycompat.to_text(format_func(value, format=pattern, locale=locale))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment