add unixtime, jwtoken

This commit is contained in:
c0decave
2021-05-04 11:33:31 +02:00
parent 12b92ef8a7
commit af3104ee3b
3 changed files with 87 additions and 0 deletions

14
utime2date.py Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python
import os
import sys
unixt = (sys.argv[1])
from datetime import datetime
ts = int(unixt)
# if you encounter a "year is out of range" error the timestamp
# may be in milliseconds, try `ts /= 1000` in that case
print(datetime.utcfromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S'))