summaryrefslogtreecommitdiff
path: root/app/Core/Translator.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-05-27 12:54:42 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-05-27 12:54:42 -0400
commit3fb5c556ec75c1a5f54171527a76530764cc24f4 (patch)
treeb3b0875ff7d0991b9cf3b2cd46cce395fcbd8255 /app/Core/Translator.php
parentc482e704697301a982e3c989ac795e0f4c2e899a (diff)
Fix some Windows Server issues
Diffstat (limited to 'app/Core/Translator.php')
-rw-r--r--app/Core/Translator.php10
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);
}
/**