We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bdf888 commit d450731Copy full SHA for d450731
securityhub-forwarder/src/securityhub_forwarder.py
@@ -40,8 +40,11 @@ def convert_to_utc(timestamp):
40
#Todo change to convert to RFC3339
41
try:
42
if not isinstance(timestamp, int):
43
- ts = timestamp.replace(",", "")
+ timestamp = timestamp.replace(",", "")
44
ts = int(timestamp)
45
+ else:
46
+ ts = timestamp
47
+ timestamp = str(timestamp)
48
ts = ts/1000 if len(timestamp) >= 13 else ts # converting to seconds
49
utcdate = datetime.utcfromtimestamp(ts).strftime('%Y-%m-%dT%H:%M:%S.%fZ')
50
except Exception as e:
0 commit comments