|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-01 18:11 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 03:00:02 2025 UTC |
The following code: <?php $b = "04/04/1999 00:00"; $timestamp = strtotime ($b); echo "$timestamp\r\n"; $test = date ("m/d/Y H:i",$timestamp); echo "$test\r\n"; $b = "04/04/1999 01:00"; $timestamp = strtotime ($b); echo $timestamp."\r\n"; $test = date ("m/d/Y H:i",$timestamp); echo "$test\r\n"; $b = "04/04/1999 02:00"; $timestamp = strtotime ($b); echo $timestamp."\r\n"; $test = date ("m/d/Y H:i",$timestamp); echo "$test\r\n"; $b = "04/04/1999 02:00"; $timestamp = strtotime ($b); echo $timestamp."\r\n"; $test = date ("m/d/Y H:i",$timestamp+3600); echo "$test\r\n"; $b = "04/04/1999 03:00"; $timestamp = strtotime ($b); echo $timestamp."\r\n"; $test = date ("m/d/Y H:i",$timestamp); echo "$test\r\n"; $b = "04/04/1999 04:00"; $timestamp = strtotime ($b); echo $timestamp."\r\n"; $test = date ("m/d/Y H:i",$timestamp); echo "$test\r\n"; ?> Returns these results: E:\PHP\scripts>php test.php X-Powered-By: PHP/4.0.3pl1 Content-type: text/html 923205600 04/04/1999 00:00 923209200 04/04/1999 01:00 923209200 04/04/1999 01:00 923209200 04/04/1999 03:00 923212800 04/04/1999 03:00 923216400 04/04/1999 04:00 Apparently, there are problems with both the strtotime and date functions. Thanks!