79494119

Date: 2025-03-08 08:45:30
Score: 2
Natty:
Report link

import datetime

time = "2020-02-25T00:02:43.000Z"

# Parse the ISO 8601 timestamp

date = datetime.datetime.strptime(time, '%Y-%m-%dT%H:%M:%S.%fZ')

# Convert to milliseconds

timestamp = int((date - datetime.datetime(1970, 1, 1)).total_seconds() * 1000)

print(timestamp)

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Raj Tiwari