summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-12-02 10:50:17 -0800
committerSteve Bennetts <steve@lindenlab.com>2009-12-02 10:50:17 -0800
commitd550339958c14f0d7fd222a8531df639eac49e63 (patch)
tree2adfe920202a4304fc37446fca5f9bd368995749 /indra/llcommon
parent6e1f6f015394a3f268608061c00993939c891e54 (diff)
parent3c8f89246712d1e5391ab1bdd6bbc36a83f210d8 (diff)
Merge from product-engine
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();
}