ID:               19362
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Date/time related
 Operating System: Solaris 8
 PHP Version:      4.2.2
 New Comment:

On Solaris 8 (SPARC) with 4.2.3, I'm getting

1032840000 = mktime(0,0,0,09,24,2002)
1032840000 = mktime(0,0,0,09,24,2002)

Which is what I'd expect, is it not?

J


Previous Comments:
------------------------------------------------------------------------

[2002-09-11 13:47:54] [EMAIL PROTECTED]

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)";

?>

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19362&edit=1

Reply via email to