ID: 37650 Updated by: [EMAIL PROTECTED] Reported By: martin at whitewallweb dot com -Status: Open +Status: Feedback Bug Type: Date/time related Operating System: Windows XP PHP Version: 5.1.4 New Comment:
Hei, what does: echo date_default_timezone_get(), "\n"; show in that same script? Previous Comments: ------------------------------------------------------------------------ [2006-05-31 08:23:56] martin at whitewallweb dot com Description: ------------ PHP mktime generated timestamps in date function do not return same output as mktime input. Reproduce code: --------------- echo date('d m Y',mktime(0, 0, 0, 6, 20, 1948)); output: 21 06 1948 echo date('d m Y',mktime(0, 0, 0, 6, 03, 1944)); output: 04 06 1944 echo date('d m Y',mktime(0, 0, 0, 6, 19, 1960)); output: 20 06 1960 echo date('d m Y',mktime(0, 0, 0, 6, 28, 1956)); output: 29 06 1956 echo date('d m Y',mktime(0, 0, 0, 8, 31, 1952)); output: 01 09 1952 echo date('d m Y',mktime(0, 0, 0, 5, 27, 1960)); output: 28 05 1960 echo date('d m Y',mktime(0, 0, 0, 7, 31, 1960)); output: 01 08 1960 Expected result: ---------------- echo date('d m Y',mktime(0, 0, 0, 6, 20, 1948)); output: 20 06 1948 echo date('d m Y',mktime(0, 0, 0, 6, 03, 1944)); output: 03 06 1944 echo date('d m Y',mktime(0, 0, 0, 6, 19, 1960)); output: 19 06 1960 echo date('d m Y',mktime(0, 0, 0, 6, 28, 1956)); output: 28 06 1956 echo date('d m Y',mktime(0, 0, 0, 8, 31, 1952)); output: 31 08 1952 echo date('d m Y',mktime(0, 0, 0, 5, 27, 1960)); output: 27 05 1960 echo date('d m Y',mktime(0, 0, 0, 7, 31, 1960)); output: 31 08 1960 Actual result: -------------- echo date('d m Y',mktime(0, 0, 0, 6, 20, 1948)); output: 21 06 1948 echo date('d m Y',mktime(0, 0, 0, 6, 03, 1944)); output: 04 06 1944 echo date('d m Y',mktime(0, 0, 0, 6, 19, 1960)); output: 20 06 1960 echo date('d m Y',mktime(0, 0, 0, 6, 28, 1956)); output: 29 06 1956 echo date('d m Y',mktime(0, 0, 0, 8, 31, 1952)); output: 01 09 1952 echo date('d m Y',mktime(0, 0, 0, 5, 27, 1960)); output: 28 05 1960 echo date('d m Y',mktime(0, 0, 0, 7, 31, 1960)); output: 01 08 1960 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37650&edit=1