mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 08:38:45 +02:00
N°7145 - UI - Init Value DateTime and Date with Day Time (support raw date values)
This commit is contained in:
@@ -6432,7 +6432,11 @@ class AttributeDateTime extends AttributeDBField
|
||||
{
|
||||
$sDefaultValue = $this->Get('default_value');
|
||||
if (utils::IsNotNullOrEmptyString($sDefaultValue)) {
|
||||
$oDate = new DateTimeImmutable(Expression::FromOQL($sDefaultValue)->Evaluate([]));
|
||||
try {
|
||||
$oDate = new DateTimeImmutable($sDefaultValue);
|
||||
} catch (Exception $e) {
|
||||
$oDate = new DateTimeImmutable(Expression::FromOQL($sDefaultValue)->Evaluate([]));
|
||||
}
|
||||
return $oDate->format($this->GetInternalFormat());
|
||||
}
|
||||
return $this->GetNullValue();
|
||||
|
||||
Reference in New Issue
Block a user