Skip to content

Commit

Permalink
fix(IDENT-3532): Update record time stamp ISO format
Browse files Browse the repository at this point in the history
  • Loading branch information
acuderman committed Oct 21, 2021
1 parent 4df6500 commit c19be40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aries_cloudagent/messaging/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_format(self):
tests = {
datetime(
2019, 5, 17, 20, 51, 19, 519437, tzinfo=timezone.utc
): "2019-05-17 20:51:19.519437Z",
): "2019-05-17T20:51:19.519437Z",
now: now,
}
for datetime_val, expected in tests.items():
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/messaging/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def datetime_to_str(dt: Union[str, datetime]) -> str:
dt: May be a string or datetime to allow automatic conversion
"""
if isinstance(dt, datetime):
dt = dt.replace(tzinfo=timezone.utc).isoformat(" ").replace("+00:00", "Z")
dt = dt.replace(tzinfo=timezone.utc).isoformat().replace("+00:00", "Z")
return dt


Expand Down

0 comments on commit c19be40

Please sign in to comment.