diff --git a/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php b/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php index 5ac5869ce73d38866a31811ce4084ee366f244e7..8f26b9cd315eb59008ee8c3caa2861e7b704cd98 100644 --- a/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php +++ b/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php @@ -220,19 +220,19 @@ abstract class AbstractFormElement extends AbstractNode case 'datetime': // compatibility with "eval" (type "input") if ($itemValue !== '' && $itemValue !== null) { - $itemValue = date('H:i d-m-Y', (int)$itemValue); + $itemValue = BackendUtility::datetime((int)$itemValue); } break; case 'time': // compatibility with "eval" (type "input") if ($itemValue !== '' && $itemValue !== null) { - $itemValue = gmdate('H:i', (int)$itemValue); + $itemValue = BackendUtility::time((int)$itemValue, false); } break; case 'timesec': // compatibility with "eval" (type "input") if ($itemValue !== '' && $itemValue !== null) { - $itemValue = gmdate('H:i:s', (int)$itemValue); + $itemValue = BackendUtility::time((int)$itemValue); } break; case 'year': diff --git a/typo3/sysext/backend/Tests/Unit/Form/Element/AbstractFormElementTest.php b/typo3/sysext/backend/Tests/Unit/Form/Element/AbstractFormElementTest.php index 9ff377d72ea80c7e4341a957199510beded8cb2e..0dc0e810ecfc10ba4a284f038b9f14725e39791d 100644 --- a/typo3/sysext/backend/Tests/Unit/Form/Element/AbstractFormElementTest.php +++ b/typo3/sysext/backend/Tests/Unit/Form/Element/AbstractFormElementTest.php @@ -82,7 +82,7 @@ class AbstractFormElementTest extends UnitTestCase 'format' => 'datetime', ], '1412358894', - '17:54 03-10-2014' + '03-10-14 17:54' ], 'format to datetime with empty value' => [ [