ccn has asked for the wisdom of the Perl Monks concerning the following question:
Please help me to understand the binary representation of datetime.I have a program which stores time as the following:
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.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 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.
Back to
Seekers of Perl Wisdom