Fix some Windows Server issues

This commit is contained in:
Frédéric Guillot
2014-05-27 12:54:42 -04:00
parent c482e70469
commit 3fb5c556ec
2 changed files with 26 additions and 6 deletions

View File

@@ -114,7 +114,15 @@ class Translator
return '';
}
return strftime($this->get($format, $format), (int) $timestamp);
$format = $this->get($format, $format);
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$format = str_replace('%e', '%d', $format);
$format = str_replace('%G', '%Y', $format);
$format = str_replace('%k', '%H', $format);
}
return strftime($format, (int) $timestamp);
}
/**