Home > OS >  Decode byte array, unknown Datetime representation
Decode byte array, unknown Datetime representation

Time:08-30

From a file that I'm trying to decode, I have the following data and his corresponding timestamps:

05/21/2022 12:30:00.000 PM 62 d9 d0 58 31 44 89 c4 00 00 00 00

8/24/2022 12:15:00.000 PM 62 fd 6f 58 31 83 27 42 00 00 00 00

First 4 bytes are close to the unix timestamp representation but just close I think byte 31 is a separator but not sure

Please help! :)

CodePudding user response:

If you take some of the bytes and multiply by 2, you can recreate the Unix timestamp.

For example,

05/21/2022 12:30:00 PM => 31 44 89 c4 => 826575300 x 2 => 1653150600 => 2022-05-21 16:30:00

8/24/2022 12:15:00 PM => 31 83 27 42 => 830678850 x 2 => 1661357700 => 2022-08-24 16:15:00

Note: data seems to be shifted 4 hours (Chile = GMT-4)

CodePudding user response:

Did you tried the INT96 format?

that's an 12 byte representation

  • Related