-> 32bit-le -> date

This commit is contained in:
dreamer 2020-09-23 01:49:16 +02:00
parent 034fa82dc5
commit 1863c5b243

10
splimport/decode.py Normal file
View File

@ -0,0 +1,10 @@
import struct
def swap32(i):
return struct.unpack("<I", struct.pack(">I", i))[0]
d=swap32(0x14a63351)
Y,M,D,h,m,s = 1980+(d>>25), (d>>21)&0xf, (d>>16)&0x1f, (d>>11)&0x1f, (d>>5)&0x3f, (d<<1)&0x3f
print(Y,M,D,h,m,s)