Skip to content

Commit 3b1d595

Browse files
committed
Revert "Remove obsolete int-to-datetime translation"
This reverts commit debeb14.
1 parent c3c615f commit 3b1d595

File tree

1 file changed

+3
-1
lines changed
  • simpleflow/swf/mapper/models/event

1 file changed

+3
-1
lines changed

simpleflow/swf/mapper/models/event/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def state(self) -> str:
9292

9393
@cached_property
9494
def timestamp(self) -> datetime:
95-
return self._timestamp.astimezone(pytz.UTC)
95+
if isinstance(self._timestamp, datetime):
96+
return self._timestamp.astimezone(pytz.UTC)
97+
return datetime.fromtimestamp(self._timestamp, tz=pytz.UTC)
9698

9799
@property
98100
def input(self) -> dict[str, Any]:

0 commit comments

Comments
 (0)