From 3fb5c556ec75c1a5f54171527a76530764cc24f4 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Tue, 27 May 2014 12:54:42 -0400 Subject: Fix some Windows Server issues --- app/Core/Translator.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'app/Core/Translator.php') 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); } /** -- cgit v1.2.3