Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Please help me to understand the binary representation of datetime.I have a program which stores time as the following:
binary data --> human readable datetime dd.mm.yy hh:mm:ss c16f b90e d17f e340 --> 01.05.09 12:47:35 5384 d5dd d27f e340 --> 01.05.09 14:09:03 1d0a 3dde d27f e340 --> 01.05.09 18:48:01 1bd8 2a11 d97f e340 --> 01.05.09 18:48:05 1b64 9211 d97f e340 --> 01.05.09 18:48:05 78d2 1182 e07f e340 --> 02.05.09 00:22:51 1cac 2682 e07f e340 --> 02.05.09 00:22:52 1cac 2682 e07f e340 --> 02.05.09 00:22:52 51d9 6182 e07f e340 --> 02.05.09 00:22:55 b74a 8982 e07f e340 --> 02.05.09 00:22:56
I'd like to be able to convert bin to txt and vice versa. I have a limited access to the program and can't just change the binary to see how time strings are changed.

I hope that it may be some standard of binary format for time. Who knows?

Update It's a PC with windows 98. I can fetch signed integer values from the log with unpack 'i', $part_of_bin_str

The program contorls a phone station and writes log messages which I want to parse and modify. I think that time granularity is far less than one second. Something like T1. The timestamp is not generated by PC but comes from phone station.


In reply to Binary format of time by ccn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (14)
    As of 2014-09-18 11:19 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (112 votes), past polls