deciphering omapi timestamps

Niall O'Reilly Niall.oReilly at
Wed Dec 6 22:18:57 UTC 2006

On 6 Dec 2006, at 18:19, Duane Cox wrote:

> ends = 45:77:17:9e

	[ ... ]

> Is there any way to rewrite the timestamps for the lease ends/ 
> starts times into a human readable form?

	Not within what bash alone can do for you.
	Working on your 'ends' value, and guessing
	it's a 32-bit integer gives the following.

dhcp-189(niall)3: pint
pint> $foo = "45:77:17:9e"
pint> $foo =~ s/://g
pint> join(':', gmtime(hex $foo))
pint> ^D

	That looks like Wed, 06 Dec 2006 19:18:54 (7:18:54 pm).


alias pint='perl -ne '\''sub BEGIN {print "pint> "} sub END {print  
"\n"} printf "%s\npint> ",eval'\'''

More information about the dhcp-users mailing list