看到这种二进制数据格式? [英] Seen this binary date format?
问题描述
= 3/10/2008 1822556159
3/10/2008 = 1822556159
2008年2月10日= 1822523391
2/10/2008 = 1822523391
2008年1月10日= 1822490623
1/10/2008 = 1822490623
30/09/2008 = 1822392319
30/09/2008 = 1822392319
29/09/2008 = 1822359551
29/09/2008 = 1822359551
这是一切,我知道在当前时间的信息。
This is all the information that I know at the current time.
32768递增日期,只是改变一个月的时候,当增量为32768×2(65536)。
Dates increment by 32768 except when changing month when the increment is 32768 x 2 (65536).
有没有人见过这个二进制数据格式,我怎么能提取正确的日期?
Has anyone seen this binary date format and how can I extract the correct date?
有可能的是,日的剩余部分为时间(小时,分,秒)
It is possible that the remaining portion of the date is for time (hours, minutes, seconds)
推荐答案
二零零八年九月三十日
1822392319 = 0x6c9f7fff
0x6c = 108 = 2008 (based on 1900 start date)
0x9 = 9 = September
0xf7fff - take top 5 bits = 0x1e = 30
2008年10月1日
October 1st 2008
1822490623 = 0x6ca0ffff
0x6c = 108 = 2008
0xa = 10 = October
0x0ffff - take top 5 bits = 0x01 = 1
这是任何人的猜测什么其余15单位是,如果有的话。
It's anyone's guess what the remaining 15 one-bits are for, if anything.
编辑:按取前5位我的意思是:
by take top 5 bits I mean:
day_of_month = (value >> 15) & 0x1f
同样的:
year = (value >> 24) & 0xff + 1900
month = (value >> 20) & 0x0f
这篇关于看到这种二进制数据格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!