[wplug] weird php issue

Chris Romano romano.chris at gmail.com
Tue Jan 26 21:48:28 EST 2010


I'm running CentOS and using php 5.1.6

There seems to be an issue with the date function.  I don't know if
there is something on my end (coding) of it's a system issue.  Here is
the code in question:

$firstWeek = date("W",mktime(0,0,0,$month,1,$year));

which for January would be something like this
$firstWeek = date("W",mktime(0,0,0,01,1,2010));

When this code is ran, $firstWeek is being set to 53.  It should be
set to 01.  The code works perfect if the year is 2009.

Any ideas?

Thanks,
Chris
-- 
"They that would trade essential liberty for a little temporary safety
deserve neither." -- Benjamin Franklin


More information about the wplug mailing list