summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationlog.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-10-15 16:03:08 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-10-15 16:03:08 -0400
commit64ecc38c841ae0cb0c3d0ccb9b1bf543ecf4230e (patch)
tree24a954501d239ecaa43fe17f6f931e720383c6c2 /indra/newview/llconversationlog.cpp
parenta2ae46ef3a0036a6030ccc1e3ef4fcdfb7f455f3 (diff)
parentcd712960f316496b29c53dce390dd778ad9d27f4 (diff)
Merge branch 'develop' into maxim/lua-nearby-avatars
Diffstat (limited to 'indra/newview/llconversationlog.cpp')
-rw-r--r--indra/newview/llconversationlog.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index ed563cbec9..ed16a4b135 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);