| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2005-02-18 04:09 UTC] rj at meadowbrook dot net
 Description:
------------
The exact same function produces two different timestamp results:
PHP 4.3.2
strtotime('12/01/04 9:00 AM');
produces 1101909600
PHP 5.0.2
strtotime('12/01/04 9:00 AM');
produces 1101909622
Any combination produces a result 22 seconds less in 5.0.2 that the result in 4.3.2
Reproduce code:
---------------
n/a
Expected result:
----------------
n/a
Actual result:
--------------
n/a
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 09:00:01 2025 UTC | 
I'm testing a script that I wrote on a remote server. My developement environment is on a Windows Platform with PHP 5.2.4 The production environment is a Unix PHP 5.2.5 The piece of script that does not work is the following: $date = '11 May 2008'; echo $date; echo "<br />"; $date = strtotime($date); echo $date; echo "<br />"; $date = date('d-M-Y H:i:s', $date); echo $date; On Windows PHP 5.2.4 the output is 11 May 2008 1210467600 11-May-2008 00:00:00 On Unix PHP 5.2.5 it is 11 May 2008 1210478400 11-May-2008 00:00:00 The two timestamps are different, even if the date() function returns the same result and the input string is the same.