thrownewInvalidParamException("Failed to parse '$value' as a UNIX timestamp.");
}
return$timestamp;
}elseif(($timestamp=DateTime::createFromFormat('Y-m-d',$value,newDateTimeZone($this->defaultTimeZone)))!==false){// try Y-m-d format (support invalid dates like 2012-13-01)
}elseif(($timestamp=DateTimeExtended::createFromFormat('Y-m-d',$value,newDateTimeZone($this->defaultTimeZone)))!==false){// try Y-m-d format (support invalid dates like 2012-13-01)
return$timestamp;
}elseif(($timestamp=DateTime::createFromFormat('Y-m-d H:i:s',$value,newDateTimeZone($this->defaultTimeZone)))!==false){// try Y-m-d H:i:s format (support invalid dates like 2012-13-01 12:63:12)
}elseif(($timestamp=DateTimeExtended::createFromFormat('Y-m-d H:i:s',$value,newDateTimeZone($this->defaultTimeZone)))!==false){// try Y-m-d H:i:s format (support invalid dates like 2012-13-01 12:63:12)
return$timestamp;
}
// finally try to create a DateTime object with the value