mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-26 15:26:03 +03:00
Fix to date properties when set as a formatted string
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@63424 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
98e7fa5a6a
commit
b818187d3c
@ -199,7 +199,14 @@ class PHPExcel_DocumentProperties
|
||||
public function setCreated($pValue = null) {
|
||||
if (is_null($pValue)) {
|
||||
$pValue = time();
|
||||
} elseif (is_string($pValue)) {
|
||||
if (is_numeric($pValue)) {
|
||||
$pValue = intval($pValue);
|
||||
} else {
|
||||
$pValue = strtotime($pValue);
|
||||
}
|
||||
}
|
||||
|
||||
$this->_created = $pValue;
|
||||
return $this;
|
||||
}
|
||||
@ -222,7 +229,14 @@ class PHPExcel_DocumentProperties
|
||||
public function setModified($pValue = null) {
|
||||
if (is_null($pValue)) {
|
||||
$pValue = time();
|
||||
} elseif (is_string($pValue)) {
|
||||
if (is_numeric($pValue)) {
|
||||
$pValue = intval($pValue);
|
||||
} else {
|
||||
$pValue = strtotime($pValue);
|
||||
}
|
||||
}
|
||||
|
||||
$this->_modified = $pValue;
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user