have got a JSON with user_uuid": "6027fd7ad748412d1c1e80e7", would like to convert it to a timestamp in millisecond.
Any help please?
Many Thanks,
have got a JSON with user_uuid": "6027fd7ad748412d1c1e80e7", would like to convert it to a timestamp in millisecond.
Any help please?
Many Thanks,
It seems to have a 4-byte value representing the seconds since the Unix epoch
Indeed, that's all you need to do:
>>> uuid = "6027fd7ad748412d1c1e80e7"
>>> seconds_since_unix_epoch = int(uuid[:8], base=16)
>>> seconds_since_unix_epoch
1613233530
Then, convert to datetime:
>>> import datetime as dt
>>> dt.timedelta(seconds=seconds_since_unix_epoch) + dt.date(1970, 1, 1)
datetime.date(2021, 2, 13)