ménage
This commit is contained in:
parent
e8c065824d
commit
f015641a11
@ -1,27 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import datetime
|
||||
|
||||
""""""
|
||||
|
||||
TIMESTAMPS = (
|
||||
161252911000,
|
||||
162352411900,
|
||||
1646927061000,
|
||||
166691206100000,
|
||||
)
|
||||
|
||||
def from_stamp(i: int) -> str:
|
||||
dt = str(i)
|
||||
if len(dt)>10:
|
||||
dt = dt[:10]
|
||||
sdt = str(datetime.datetime.fromtimestamp(int(dt)))
|
||||
print(f" {dt} : {sdt}")
|
||||
return sdt
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("formatted UNIX dates")
|
||||
for i in TIMESTAMPS:
|
||||
from_stamp(i)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user