summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorskolb <none@none>2009-12-03 09:18:11 -0800
committerskolb <none@none>2009-12-03 09:18:11 -0800
commit7851819c88e8049c1c3d07d279d479c53d5de777 (patch)
treee8c81e110a71427b64e0b34f4351e7acf44465f3 /indra/llcommon/llstring.cpp
parent9b17e6710b713fa12f6db7d6f51d97e4052a0835 (diff)
parent57b68d9bfe25fc7b9efe41a9fa30935c156acb34 (diff)
local merge
Diffstat (limited to 'indra/llcommon/llstring.cpp')
-rw-r--r--indra/llcommon/llstring.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index c027aa7bdd..5f3d9d6582 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -985,6 +985,15 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
return true;
}
replacement = datetime.toHTTPDateString(code);
+
+ // *HACK: delete leading zero from hour string in case 'hour12' (code = %I) time format
+ // to show time without leading zero, e.g. 08:16 -> 8:16 (EXT-2738).
+ // We could have used '%l' format instead, but it's not supported by Windows.
+ if(code == "%I" && token == "hour12" && replacement.at(0) == '0')
+ {
+ replacement = replacement.at(1);
+ }
+
return !code.empty();
}