- fix [ 1225432 ] plainblack.com: print is broken

- fix [ 1249882 ] Make page printable in RWG broken
 - fix [ 1255313 ] r_printable includes index.pl sometimes
This commit is contained in:
JT Smith 2005-08-23 20:58:37 +00:00
parent 506b16a8a0
commit a93a2d05d1
5 changed files with 25 additions and 4 deletions

View file

@ -68,11 +68,22 @@ These functions are available from this package:
sub epochToDate {
my $secs = shift;
return &ParseDateString("epoch $secs");
my $cache = WebGUI::Cache->new(["epochToDate",$secs],"DateTime");
my $value = $cache->get;
return $value if ($value);
my $converted = &ParseDateString("epoch $secs");
$cache->set($converted);
return $converted;
}
sub dateToEpoch {
return &UnixDate(shift,"%s");
my $date = shift;
my $cache = WebGUI::Cache->new(["dateToEpoch",$date],"DateTime");
my $value = $cache->get;
return $value if ($value);
my $converted = &UnixDate($date,"%s");
$cache->set($converted);
return $converted;
}