|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-24 15:40 UTC] dark_panda at hushmail dot com
[2002-09-24 15:43 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 08:00:02 2025 UTC |
This code is supposed to return the same output in the two "echos" because we simple take the date from the S.O. then I split it in the variables for day, month and year and then when we create the date again from this very same value it gives the wrong output in a Solaris 8 machine with php 4.2.2 and 4.2.3 It works ok in Solaris 7 and php 4.1.1 <? // ****************** // Tomo el dia de hoy // ****************** $FechaDeHoy = time(); $td = gmdate("d",$FechaDeHoy); $tm = gmdate("m",$FechaDeHoy); $ta = gmdate("Y",$FechaDeHoy); $FechaDeHoy = mktime(0,0,0,$tm,$td,$ta); echo "<br>$FechaDeHoy = mktime(0,0,0,$tm,$td,$ta)"; $td = gmdate("d",$FechaDeHoy); $tm = gmdate("m",$FechaDeHoy); $ta = gmdate("Y",$FechaDeHoy); $FechaDeHoy = mktime(0,0,0,$tm,$td,$ta); echo "<br>$FechaDeHoy = mktime(0,0,0,$tm,$td,$ta)"; ?>