|
How do I convert
...but How can I get a formatted time-string from Wireshark 1.7, Win 7, Lua 5.1
This question is marked "community wiki".
|
|
You're looking for
But I should point out some other things about your sample code above:
Helloworld, very thenks to you! But code: local seconds = tostring(buf(offset,8):le_nstime()) seconds = tonumber(seconds) value[i] = format_date(seconds) don't work. Because tonumber function return nil. I think this mistake arises, because 8 byte double can't converted in Lua. This code works correctly: local seconds = tostring( buf(offset,4):le_nstime()); seconds = string.sub(seconds,0,10); --[[ Return 10 numbers of seconds, from January 1, 1970 ]]-- seconds = tonumber(seconds); value[i] = format_date(seconds);
(06 Jun '12, 00:52)
PavelMSTU
Actually, an You don't need to parse out the seconds from the string since
(06 Jun '12, 07:39)
helloworld
|
