Fix epoch=0 issues with Session/DateTime and D_date macro.
Add an edge case test for D_date macro.
This commit is contained in:
parent
ae08335e9c
commit
a7aa1d2fb2
3 changed files with 18 additions and 9 deletions
|
|
@ -37,12 +37,13 @@ time is used instead.
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my $session = shift;
|
||||
my (@param, $temp, $time);
|
||||
@param = @_;
|
||||
$time = $param[1] ||time();
|
||||
$temp =$session->datetime->epochToHuman($time,$param[0]);
|
||||
return $temp;
|
||||
my $session = shift;
|
||||
my $time = $_[1];
|
||||
if (! defined $time) {
|
||||
$time = time();
|
||||
}
|
||||
my $temp = $session->datetime->epochToHuman($time, $_[0]);
|
||||
return $temp;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue