diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-05-27 12:54:42 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-05-27 12:54:42 -0400 |
commit | 3fb5c556ec75c1a5f54171527a76530764cc24f4 (patch) | |
tree | b3b0875ff7d0991b9cf3b2cd46cce395fcbd8255 /app/Core/Translator.php | |
parent | c482e704697301a982e3c989ac795e0f4c2e899a (diff) |
Fix some Windows Server issues
Diffstat (limited to 'app/Core/Translator.php')
-rw-r--r-- | app/Core/Translator.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/Core/Translator.php b/app/Core/Translator.php index 015a76cb..d9386d3a 100644 --- a/app/Core/Translator.php +++ b/app/Core/Translator.php @@ -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); } /** |