Fixes poezio/poezio#3472: Don't remove TZ in 0202 utc tag

<utc/> MUST conform to 0082 dateTime profile and thus include a
timezone definition.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2019-04-06 13:42:26 +01:00
parent 0042108a67
commit 1cdc656208
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -123,5 +123,5 @@ class EntityTime(ElementBase):
if not isinstance(value, dt.datetime):
date = xep_0082.parse(value)
date = date.astimezone(tzutc())
value = xep_0082.format_datetime(date)[:-1]
value = xep_0082.format_datetime(date)
self._set_sub_text('utc', value)