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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|