Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Binary format of time

by moritz (Cardinal)
on May 26, 2009 at 07:14 UTC ( [id://766143]=note: print w/replies, xml ) Need Help??


in reply to Binary format of time

I think that the dates are encoded in a "least significant first" scheme, ie the year and month are encoded in the last digits, while the hours, minutes and seconds are encoded in the earlier parts of the digits.

However, I also have my doubts, because of these two lines:

1bd8 2a11 d97f e340 --> 01.05.09 18:48:05 1b64 9211 d97f e340 --> 01.05.09 18:48:05

For two identical dates the first six hex digits are completely different, making me wonder if they belong to the date encoding at all.

Are you sure that the binary data you show us actually encodes the full date?

Replies are listed 'Best First'.
Re^2: Binary format of time
by ccn (Vicar) on May 26, 2009 at 07:49 UTC
    I suspect that time is stored in some ticks but is showed in seconds. Please see the update of original post. I am almost shure that those 8 bytes are time.

      Thinking 8 bytes and ticks you might want to try the following:

      First four bytes (0-3) | Last four bytes (4-7) --------------------------------------------------- seconds since epoch, | additional micro- e.g. 00:00 1st Jan 1970 | seconds Both four byte values are 32 bit integers.

      However, my first calculations give timestamps nowhere near the ones you provide. Maybe some CCSDS time format was used?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://766143]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-03-29 09:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found