#39959 [Opn->Fbk]: date "w" returns incorrect data

From: Date: Wed, 27 Dec 2006 08:58:18 +0000
Subject: #39959 [Opn->Fbk]: date "w" returns incorrect data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106909@lists.php.net to get a copy of this message
 ID:               39959
 Updated by:       derick@php.net
 Reported By:      testingthis222 at hotmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Output Control
 Operating System: unknown
 PHP Version:      5.2.0
 New Comment:

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?


Previous Comments:
------------------------------------------------------------------------

[2006-12-26 23:50:40] 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)

?



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39959&edit=1


Thread (4 messages)

« previous php.bugs (#106909) next »