Commit 39b3dd7056823add4f8053d20a2b2bf42327d450

Authored by Elena.Budnik
1 parent ae3373c4

Megan bug : no z definition in time format

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
php/classes/FilesMgr.php
@@ -435,6 +435,7 @@ class FilesMgr extends AmdaObjectMgr @@ -435,6 +435,7 @@ class FilesMgr extends AmdaObjectMgr
435 protected function reformatTime($timeFormat, $timeLength, $doy) 435 protected function reformatTime($timeFormat, $timeLength, $doy)
436 { 436 {
437 $formatLength = $timeLength == 'auto' ? strlen($timeFormat) + (strpos($timeFormat,"Y") !== false)*3 + (strpos($timeFormat,"y") !== false) 437 $formatLength = $timeLength == 'auto' ? strlen($timeFormat) + (strpos($timeFormat,"Y") !== false)*3 + (strpos($timeFormat,"y") !== false)
  438 + + (strpos($timeFormat,"z") !== false)*2
438 + (strpos($timeFormat,"M") !== false)*2 + (strpos($timeFormat,"m") !== false) 439 + (strpos($timeFormat,"M") !== false)*2 + (strpos($timeFormat,"m") !== false)
439 + (strpos($timeFormat,"d") !== false) + (strpos($timeFormat,"H") !== false) 440 + (strpos($timeFormat,"d") !== false) + (strpos($timeFormat,"H") !== false)
440 + (strpos($timeFormat,"i") !== false) + (strpos($timeFormat,"s") !== false) 441 + (strpos($timeFormat,"i") !== false) + (strpos($timeFormat,"s") !== false)
@@ -471,6 +472,7 @@ class FilesMgr extends AmdaObjectMgr @@ -471,6 +472,7 @@ class FilesMgr extends AmdaObjectMgr
471 if (!$date) 472 if (!$date)
472 { 473 {
473 if (strpos($oneLine,'#') === 0) fwrite($newfile, $oneLine.PHP_EOL); 474 if (strpos($oneLine,'#') === 0) fwrite($newfile, $oneLine.PHP_EOL);
  475 + else return false;
474 } 476 }
475 else 477 else
476 { 478 {
@@ -484,7 +486,7 @@ class FilesMgr extends AmdaObjectMgr @@ -484,7 +486,7 @@ class FilesMgr extends AmdaObjectMgr
484 } 486 }
485 catch (Exception $e) 487 catch (Exception $e)
486 { 488 {
487 - // fwrite($newfile,$line.PHP_EOL); 489 + return false;
488 } 490 }
489 } 491 }
490 else 492 else