summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2009-12-03 13:35:44 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2009-12-03 13:35:44 -0500
commita9609ae1557a70e095088e0a9b6ef5564dfdb388 (patch)
treef0fd474461afe3857bf6472f0ae896a276af21cb /indra/llcommon
parent4fb7fd9fffde08ffad4b2fe8f5ead5e500d76419 (diff)
parentb05ebd89775792762063d3af08f0fe9ae785454a (diff)
merge
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/llcommon')
-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();
}