aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLS80 <github@lee-smith.me.uk>2015-10-24 06:21:46 +0100
committerLS80 <github@lee-smith.me.uk>2015-10-25 16:00:51 +0000
commitd1ebec6af66e15b721789f6c2139adf474a37795 (patch)
treec33efec4ae00a8e4e9464be2af45dd9a7092fd88
parent9a517d9cc891852260243cea3eff7b6608f351f5 (diff)
[python] Fixed getRegion dateshort format without leading zero
-rw-r--r--xbmc/interfaces/legacy/ModuleXbmc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/xbmc/interfaces/legacy/ModuleXbmc.cpp b/xbmc/interfaces/legacy/ModuleXbmc.cpp
index 59517bab9b..7bf9093fec 100644
--- a/xbmc/interfaces/legacy/ModuleXbmc.cpp
+++ b/xbmc/interfaces/legacy/ModuleXbmc.cpp
@@ -420,6 +420,13 @@ namespace XBMCAddon
result = g_langInfo.GetDateFormat(false);
StringUtils::Replace(result, "MM", "%m");
StringUtils::Replace(result, "DD", "%d");
+#ifdef TARGET_WINDOWS
+ StringUtils::Replace(result, "M", "%#m");
+ StringUtils::Replace(result, "D", "%#d");
+#else
+ StringUtils::Replace(result, "M", "%-m");
+ StringUtils::Replace(result, "D", "%-d");
+#endif
StringUtils::Replace(result, "YYYY", "%Y");
}
else if (strcmpi(id, "tempunit") == 0)