diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-10-10 23:42:05 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-09-10 22:48:16 +0300 |
| commit | 003092955486dfb0882d49d6b40586431df6368b (patch) | |
| tree | 96e3430aa6f3c4f0db8d7c5b69961c9b9f9bbc97 /indra/newview/llconversationlog.cpp | |
| parent | 92c3cbbb04968b85ccb090258a2a6e8ba96628c6 (diff) | |
viewer#2172 AM/PM selector
Diffstat (limited to 'indra/newview/llconversationlog.cpp')
| -rw-r--r-- | indra/newview/llconversationlog.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index cea68c1779..65a068e08d 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -118,11 +118,21 @@ const std::string LLConversation::createTimestamp(const U64Seconds& utc_time) LLSD substitution; substitution["datetime"] = (S32)utc_time.value(); - timeStr = "["+LLTrans::getString ("TimeMonth")+"]/[" - +LLTrans::getString ("TimeDay")+"]/[" - +LLTrans::getString ("TimeYear")+"] [" - +LLTrans::getString ("TimeHour")+"]:[" - +LLTrans::getString ("TimeMin")+"]"; + static bool use_24h = gSavedSettings.getBOOL("Use24HourClock"); + timeStr = "[" + LLTrans::getString("TimeMonth") + "]/[" + + LLTrans::getString("TimeDay") + "]/[" + + LLTrans::getString("TimeYear") + "] ["; + if (use_24h) + { + timeStr += LLTrans::getString("TimeHour") + "]:[" + + LLTrans::getString("TimeMin") + "]"; + } + else + { + timeStr += LLTrans::getString("TimeHour12") + "]:[" + + LLTrans::getString("TimeMin") + "] [" + + LLTrans::getString("TimeAMPM") + "]"; + } LLStringUtil::format (timeStr, substitution); |
