ID:               39959
 User updated by:  testingthis222 at hotmail dot com
 Reported By:      testingthis222 at hotmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Output Control
 Operating System: unknown
 PHP Version:      4.4.4
 New Comment:

should have used

$is_day=jddayofweek(cal_to_jd(CAL_GREGORIAN,$month,$day,$year),0)+1;

to dates prior to 1970 in version 4.4.4.


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

[2006-12-27 14:29:35] testingthis222 at hotmail dot com

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.

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

[2006-12-27 08:58:18] [EMAIL PROTECTED]

Works for me:
[EMAIL PROTECTED]:~$ php
<?php
echo date("w",mktime(0,0,0,12,01,1933));

?>
5

[EMAIL PROTECTED]:~$ 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?

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

[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

Reply via email to