见过这种二进制日期格式吗? [英] Seen this binary date format?
问题描述
3/10/2008 = 1822556159
3/10/2008 = 1822556159
2/10/2008 = 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 x 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)
推荐答案
2008 年 9 月 30 日
September 30th 2008
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 个 1 位是干什么用的.
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屋!