omapi-perl leases Time Format
Uwe.Buchwitz at gavi.de
Uwe.Buchwitz at gavi.de
Tue Mar 20 15:37:25 UTC 2007
Usinf omapi-perl I am trying to get a report of all my active leases
including the start time and the end time of the lease. I get an result,
but the Date and time is not what I expected. Here some examples:
12.03.1907.09.09.41
26.01.1917.16.16.21
Its really not that far in the past the clients got their leases.
Here part of my code:
use OMAPI::DHCP;
use MIME::Base64;
use Time::localtime;
$s = $$L1{"starts"};
$ss = localtime($s);
printf("%02d.%02d.%04d.%02d.%02d.%02d", $ss->mday, $ss->mon+1, $ss->year
+ 1900, $ss->hour, $ss->min, $ss->sec );
Has anybody an Idea how to get the correct format??
Uwe Buchwitz
More information about the dhcp-hackers
mailing list