diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2012-10-23 08:06:28 -0700 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2012-10-23 08:06:28 -0700 |
commit | d18ea0e76c23af5108065568eec42f70b0a3d3a8 (patch) | |
tree | b0c878501a21fde0e1a597bfd27c5dba0011b14c /lib | |
parent | 7fdbce6ac164240b9486177ff0b6e880869e910f (diff) | |
parent | 9601352d469e6c00dbc746fd72d0f3ee7f1b9e66 (diff) | |
download | nextcloud-server-d18ea0e76c23af5108065568eec42f70b0a3d3a8.tar.gz nextcloud-server-d18ea0e76c23af5108065568eec42f70b0a3d3a8.zip |
Merge pull request #40 from scambra/dateformat-fixes
Dateformat fixes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/l10n.php b/lib/l10n.php index 41c89a7d4b5..f1a2523c307 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -223,7 +223,12 @@ class OC_L10N{ $locales[] = $locales[0].'_'.strtoupper($locales[0]); } setlocale(LC_TIME, $locales); - return strftime($this->localizations[$type], $data); + $format = $this->localizations[$type]; + // Check for Windows to find and replace the %e modifier correctly + if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { + $format = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $format); + } + return strftime($format, $data); break; case 'firstday': case 'jsdate': |