Edit report at https://bugs.php.net/bug.php?id=65765&edit=1
ID: 65765 User updated by: patrik at votocek dot cz Reported by: patrik at votocek dot cz Summary: createFromFormat('U') ignore current timezone -Status: Open +Status: Closed Type: Bug Package: Date/time related Operating System: Linux x86_64 PHP Version: 5.5.4 Block user comment: N Private report: N New Comment: It's not bug it's feature... Previous Comments: ------------------------------------------------------------------------ [2013-09-26 11:25:14] patrik at votocek dot cz Description: ------------ DateTime::createFromFormat('U', $time); ignore current timezone. Test script: --------------- <?php $time = time(); var_dump(date('r', $time)); var_dump(\DateTime::createFromFormat('U', $time)->format('r')); Expected result: ---------------- string(31) "Thu, 26 Sep 2013 13:17:37 +0200" string(31) "Thu, 26 Sep 2013 13:17:37 +0200" Actual result: -------------- string(31) "Thu, 26 Sep 2013 13:17:37 +0200" string(31) "Thu, 26 Sep 2013 11:17:37 +0000" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65765&edit=1