xref: /PHP-5.3/ext/date/tests/009_win32.phpt (revision e753493c)
1--TEST--
2strftime() and gmstrftime() tests
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) != 'WIN') die('skip only windows test.');
6if (!function_exists('strftime')) die("skip, strftime not available");
7?>
8--FILE--
9<?php
10date_default_timezone_set('Asia/Jerusalem');
11
12$t = mktime(0,0,0, 6, 27, 2006);
13
14var_dump(strftime());
15
16var_dump(strftime(""));
17
18var_dump(strftime("%a %A %b %B %c %d %H %I %j %m %M %p %S %U %W %w %x %X %y %Y %Z %z %%", $t));
19
20var_dump(strftime("%%q %%a", $t));
21
22var_dump(strftime("blah", $t));
23
24var_dump(gmstrftime());
25
26var_dump(gmstrftime(""));
27
28var_dump(gmstrftime("%a %A %b %B %c %d %H %I %j %m %M %p %S %U %W %w %x %X %y %Y %Z %z %%", $t));
29
30var_dump(gmstrftime("%%q %%a", $t));
31
32var_dump(gmstrftime("blah", $t));
33
34echo "Done\n";
35?>
36--EXPECTF--
37Warning: strftime() expects at least 1 parameter, 0 given in %s on line %d
38bool(false)
39bool(false)
40string(%d) "Tue Tuesday Jun June 06/27/06 00:00:00 27 00 12 178 06 00 AM 00 26 26 2 06/27/06 00:00:00 06 2006 %s"
41string(5) "%q %a"
42string(4) "blah"
43
44Warning: gmstrftime() expects at least 1 parameter, 0 given in %s on line %d
45bool(false)
46bool(false)
47string(%d) "Mon Monday Jun June 06/26/06 21:00:00 26 21 09 177 06 00 PM 00 26 26 1 06/26/06 21:00:00 06 2006 %s"
48string(5) "%q %a"
49string(4) "blah"
50Done
51