Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why does the following date code produce 201053 instead of 201001

0 views
Skip to first unread message

Chris

unread,
Jan 2, 2010, 2:44:03 PM1/2/10
to
Very strange, why does the following code produce 201053 instead of
201001?

$this_monday = 1262566800; // 4th January 2010, 1am.
echo date("YW", $this_monday);

I am in the UK but my webhost is in Texas, cst, using PHP 5.2.1.

I'm baffled?

Thanks for the help

Jerry Stuckle

unread,
Jan 2, 2010, 4:34:22 PM1/2/10
to

Because that is 1AM GMT, not CST. It's 7PM on Sunday in Texas, which is
in the 53rd week of 2009.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

Chris

unread,
Jan 3, 2010, 5:42:15 AM1/3/10
to
> jstuck...@attglobal.net
> ==================

Jerry,

Thanks!

Chris

0 new messages