Annotation of embedaddon/php/ext/date/tests/format-negative-timestamp.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: strtotime() - Format: @timestamps
        !             3: --FILE--
        !             4: <?php
        !             5: date_default_timezone_set("GMT");
        !             6: 
        !             7: $i = 5;
        !             8: $max = getrandmax();
        !             9: $max_2 = $max / 2;
        !            10: 
        !            11: while($i--) {
        !            12:        $new_tm = rand(1, $max);
        !            13:        if ($new_tm > $max_2)
        !            14:                $new_tm *= -1;
        !            15: 
        !            16:        if (strtotime("@$new_tm") != $new_tm) {
        !            17:                echo "Error when parsing: @$new_tm\n";
        !            18:        }
        !            19: }
        !            20: 
        !            21: echo "done!";
        !            22: ?>
        !            23: --EXPECT--
        !            24: done!

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>