Little PHP4 fix (can't handle date('c'))
This commit is contained in:
parent
394dd223bc
commit
0b2208f7c4
1 changed files with 7 additions and 1 deletions
|
@ -438,7 +438,13 @@ class MetaData{
|
||||||
*/
|
*/
|
||||||
function regenerateXmlFile()
|
function regenerateXmlFile()
|
||||||
{
|
{
|
||||||
$r = $this->setMetadataValue('ls:mtime', date('c'));
|
$atime = date('c');
|
||||||
|
// php4 fix:
|
||||||
|
if($atime=='c'){
|
||||||
|
$tz=preg_replace("|00$|",":00",trim(`date +%z`));
|
||||||
|
$atime=trim(`date +%Y-%m-%dT%H:%M:%S`).$tz;
|
||||||
|
}
|
||||||
|
$r = $this->setMetadataValue('ls:mtime', $atime);
|
||||||
if(PEAR::isError($r)) return $r;
|
if(PEAR::isError($r)) return $r;
|
||||||
$fn = $this->fname;
|
$fn = $this->fname;
|
||||||
$xml = $this->genXMLDoc();
|
$xml = $this->genXMLDoc();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue