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