Skip to content

Commit

Permalink
no use for microseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Feb 12, 2018
1 parent a742f78 commit edc11dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Expand Up @@ -20,7 +20,7 @@ Bugfixes:
- Fix workflow translations with unicode characters.
[Gagaro]

- Fix workflow encoding in transition endpoint
- Fix workflow encoding in transition endpoint.
[Gagaro]


Expand Down
6 changes: 3 additions & 3 deletions src/plone/restapi/serializer/converters.py
Expand Up @@ -32,9 +32,9 @@ def datetimelike_to_iso(value):
# timezone aware date/time objects are converted to UTC first.
utc = pytz.timezone('UTC')
value = value.astimezone(utc)
# if getattr(value, 'microsecond', False):
# # Microseconds are normally not used in Plone
# value.replace(microsecond=0)
if getattr(value, 'microsecond', False):
# Microseconds are normally not used in Plone
value = value.replace(microsecond=0)
iso = value.isoformat()
# if value.tzinfo:
# # Use "Z" instead of a timezone offset of "+00:00" to indicate UTC.
Expand Down

0 comments on commit edc11dd

Please sign in to comment.