NYCPHP Meetup

NYPHP.org

[nycphp-talk] strtotime inconsistency

Michael Southwell michael.southwell at nyphp.org
Sun Aug 13 21:36:15 EDT 2006


Investigating why the upcoming schedule for a client's Mets blog was
not displaying properly, I have observed the following:

This script:
<?php
echo strtotime( '8/13/2006' ) . '<br />';
echo strtotime( date( 'm/d/Y' ) );

when run at midday on 13 August on two different servers with php
4.3.9/ap 1.3.24 and php 4.3.11/ap 1.3.34 respectively, returns this:
1155441600
1155441600
(which I believe is indeed 13 August)

but when run on two other servers with php 5.0.5/ap 1.3.34 and php
4.3.11/ap 1.3.33 respectively, returns this:
1155452400
1155452400
(which I believe is actually 14 August)

So when the db contains 1155441600 for today's game, the server shows
tomorrow's game, but--this is really weird--identifies it as a Sunday
game. Does anybody have any ideas about what might be going on here?


Michael Southwell, Vice President for Education
New York PHP
http://www.nyphp.com/training - In-depth PHP Training Courses 




More information about the talk mailing list