python - Deciphering hex-codes as (probably) a timestamp -
i'm parsing logs unclean , exist on 1 line per log-file.
i've managed strip them apart regular expressions, leaving me weird hex-like number , it's log-string. think sequence in hex-like number timestamp, can't figure out how decipher it.
i wondering if might see pattern.
513328f8003d 51332900003d 5133290c003d 5133293c003d 51332945003d 5133294e003d 51332955003d
this seconds later
5134519a102b 5134519c0039 513451b0132b 513451b3102b 513451b31329 513451b3182b 513451b31a2f
in few occasions, numbers same. on around 28000 rows happens few times. i'm guessing logs time per second, , in few cases generate encoded timestamp on exact same time, this:
51345d391929 51345d391929 51345d3a042b
the update time of log-file (except double-time stated above) around 08:45 morning.
maybe it's weird way of notating microtime? can't figure out :p
it seems leftmost 4 bytes timestamp:
in [29]: datetime.datetime.fromtimestamp(0x5134519a) out[29]: datetime.datetime(2013, 3, 4, 11, 47, 38) in [30]: datetime.datetime.fromtimestamp(0x51332955) out[30]: datetime.datetime(2013, 3, 3, 14, 43, 33)
what maximum value of rightmost 2 bytes? if not uniformly 0000-ffff
it's unlikely it's fractional seconds. , they're larger 0x3e8
, can't milliseconds.
Comments
Post a Comment