migrating datetime api for session
This commit is contained in:
parent
c4354c1ff1
commit
9520b4ce48
52 changed files with 435 additions and 332 deletions
|
|
@ -19,7 +19,7 @@ Package WebGUI::Macro::D_date
|
|||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Macro for displaying dates formatted for reading by people using WebGUI::DateTime::epochToHuman().
|
||||
Macro for displaying dates formatted for reading by people using $session->datetime->epochToHuman().
|
||||
|
||||
=head2 process ( format string, [ date ] )
|
||||
|
||||
|
|
@ -41,8 +41,8 @@ sub process {
|
|||
my $session = shift;
|
||||
my (@param, $temp, $time);
|
||||
@param = @_;
|
||||
$time = $param[1] || time();
|
||||
$temp = epochToHuman($time,$param[0]);
|
||||
$time = $param[1] ||$session->datetime->time();
|
||||
$temp =$session->datetime->epochToHuman($time,$param[0]);
|
||||
return $temp;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ sub process {
|
|||
$format = '%z' if ($format eq "");
|
||||
($time) = $session->dbSlave->quickArray("SELECT max(revisionDate) FROM assetData where assetId=".$session->db->quote($session->asset->getId));
|
||||
return WebGUI::International::get('never','Macro_LastModified') if $time eq 0;
|
||||
return $label.epochToHuman($time,$format) if ($time);
|
||||
return $label$session->datetime->epochToHuman($time,$format) if ($time);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue