Annotation of embedaddon/php/ext/date/tests/strftime_variation23.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test strftime() function : usage variation - Checking large positive and negative float values to timestamp.
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : string strftime(string format [, int timestamp])
                      6:  * Description: Format a local time/date according to locale settings 
                      7:  * Source code: ext/date/php_date.c
                      8:  * Alias to functions: 
                      9:  */
                     10: 
                     11: echo "*** Testing strftime() : usage variation ***\n";
                     12: 
                     13: // Initialise function arguments not being substituted (if any)
                     14: setlocale(LC_ALL, "en_US");
                     15: date_default_timezone_set("UTC");
                     16: $format = '%b %d %Y %H:%M:%S';
                     17: 
                     18: echo "\n-- Testing strftime() function with float 12.3456789000e10 to timestamp --\n";
                     19: $timestamp = 12.3456789000e10;
                     20: var_dump( strftime($format, $timestamp) );
                     21: 
                     22: echo "\n-- Testing strftime() function with float -12.3456789000e10 to timestamp --\n";
                     23: $timestamp = -12.3456789000e10;
                     24: var_dump( strftime($format, $timestamp) );
                     25: 
                     26: ?>
                     27: ===DONE===
                     28: --EXPECTREGEX--
                     29: \*\*\* Testing strftime\(\) : usage variation \*\*\*
                     30: 
                     31: -- Testing strftime\(\) function with float 12.3456789000e10 to timestamp --
                     32: string\(\d*\)\s"Mar\s(26|11)\s(1935|5882)\s(04|00):(50|30):(16|00)"
                     33: 
                     34: -- Testing strftime\(\) function with float -12.3456789000e10 to timestamp --
                     35: string\(\d*\)\s"(Oct|Dec)\s(08|13|22)\s(2004|1901|-1943)\s(19|20|23):(09|45|30):(44|52|00)"
                     36: ===DONE===

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