Fix for CIMC
This commit is contained in:
parent
634c9206e2
commit
1a0134ed94
|
@ -105,10 +105,16 @@ sub check_options {
|
||||||
sub get_timestamp {
|
sub get_timestamp {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
my $value = unpack('H*', $options{value});
|
my $currentTmsp = 0;
|
||||||
$value =~ /^([0-9a-z]{4})([0-9a-z]{2})([0-9a-z]{2})([0-9a-z]{2})([0-9a-z]{2})([0-9a-z]{2})/;
|
my $value = $options{value};
|
||||||
|
if ($value =~ /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/) {
|
||||||
|
$currentTmsp = mktime($6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||||
|
} else {
|
||||||
|
$value = unpack('H*', $value);
|
||||||
|
$value =~ /^([0-9a-z]{4})([0-9a-z]{2})([0-9a-z]{2})([0-9a-z]{2})([0-9a-z]{2})([0-9a-z]{2})/;
|
||||||
|
$currentTmsp = mktime(hex($6), hex($5), hex($4), hex($3), hex($2) - 1, hex($1) - 1900);
|
||||||
|
}
|
||||||
|
|
||||||
my $currentTmsp = mktime(hex($6), hex($5), hex($4), hex($3), hex($2) - 1, hex($1) - 1900);
|
|
||||||
return $currentTmsp;
|
return $currentTmsp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,4 +236,4 @@ Event older (current time - retention time) is not checked (in seconds).
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue