- 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:
parent
506b16a8a0
commit
a93a2d05d1
5 changed files with 25 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue