Make date format test compatible with all locales

This commit is contained in:
ruan 2017-01-01 08:12:09 +02:00
parent d80d7b2f49
commit 2dbe4c1da6
No known key found for this signature in database
GPG Key ID: 062534EE618F498C

View File

@ -122,12 +122,12 @@ final class Settings {
$fail = true; $fail = true;
} }
$test = strftime("%B %d, %Y, %R", 0); $test = strftime("%F %T", 0);
if ($test !== "January 01, 1970, 00:00") { if ($test !== "1970-01-01 00:00:00") {
ob_start(); ob_start();
var_dump($test); var_dump($test);
$testdump = ob_get_clean(); $testdump = ob_get_clean();
echo("Assertion failed: strftime(\"%B %d, %Y, %R\",0) != \"January 01, 1970, 00:00\"<br>"); echo("Assertion failed: strftime(\"%F %T\",0) != \"1970-01-01 00:00:00\"<br>");
echo("Actual result: " . $testdump); echo("Actual result: " . $testdump);
$fail = true; $fail = true;
} }