diff options
author | Paul Guslisty <pguslisty@productengine.com> | 2009-12-02 12:05:01 +0200 |
---|---|---|
committer | Paul Guslisty <pguslisty@productengine.com> | 2009-12-02 12:05:01 +0200 |
commit | a7eb37012b2d5b0b30ad7f9f06d4e0f4c590e5e8 (patch) | |
tree | 9c8f9eb08a2309fc960262142a6ae5a0e475cd1c | |
parent | 4bf428c4ee17d30f16bec26404fa70db22f3b059 (diff) |
fixed normal bug EXT-2738 ([BSI] 12-hour clock format should not have a leading zero)
--HG--
branch : product-engine
-rw-r--r-- | indra/llcommon/llstring.cpp | 9 |
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(); } |