看到这个二进制日期格式? [英] Seen this binary date format?

查看:223
本文介绍了看到这个二进制日期格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

3/10/2008 = 1822556159

3/10/2008 = 1822556159

2/10/2008 = 1822523391

2/10/2008 = 1822523391

1/10 / 2008 = 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个一位是什么,如果有的话。

It's anyone's guess what the remaining 15 one-bits are for, if anything.

编辑:以前5位表示:

day_of_month = (value >> 15) & 0x1f

同样:

year = (value >> 24) & 0xff + 1900
month = (value >> 20) & 0x0f

这篇关于看到这个二进制日期格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆