|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-12-26 23:50 UTC] testingthis222 at hotmail dot com
Description:
------------
echo date("w",mktime(0,0,0,12,01,1933));
gives the wrong day
it returns 3 (=wednesday)
but it should be 5 (=friday)
?
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
Works for me: derick@kossu:~$ php <?php echo date("w",mktime(0,0,0,12,01,1933)); ?> 5 derick@kossu:~$ php -v PHP 5.2.1RC2-dev (cli) (built: Dec 23 2006 20:56:19) (DEBUG) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies Which timezone is listed in phpinfo() output and what does "echo date_default_timezone_get();" output?I'm sorry I seem to have posted it in the wrong version-thread. My php version is 4.4.4. echo date("w",mktime(0,0,0,12,01,1933)); returns 3 while it should be 5 (shouldn't it be 5 regardless of timezone?) anyway; phpinfo() has no default TZ listed; and changing it to a US timezone doesn't change the output (still returns 3) echo date_default_timezone_get(); seems to not be available in version 4.4.4.