migrating datetime api for session

This commit is contained in:
JT Smith 2006-01-10 17:06:41 +00:00
parent c4354c1ff1
commit 9520b4ce48
52 changed files with 435 additions and 332 deletions

View file

@ -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;
}

View file

@ -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;