summaryrefslogtreecommitdiff
path: root/indra/newview/llworldmap.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-10-10 23:42:05 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-09-10 22:48:16 +0300
commit003092955486dfb0882d49d6b40586431df6368b (patch)
tree96e3430aa6f3c4f0db8d7c5b69961c9b9f9bbc97 /indra/newview/llworldmap.cpp
parent92c3cbbb04968b85ccb090258a2a6e8ba96628c6 (diff)
viewer#2172 AM/PM selector
Diffstat (limited to 'indra/newview/llworldmap.cpp')
-rw-r--r--indra/newview/llworldmap.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index 7962c28e6d..153bee3aef 100644
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -32,6 +32,7 @@
#include "message.h"
#include "lltracker.h"
#include "lluistring.h"
+#include "llviewercontrol.h"
#include "llviewertexturelist.h"
#include "lltrans.h"
#include "llgltexture.h"
@@ -492,9 +493,20 @@ bool LLWorldMap::insertItem(U32 x_world, U32 y_world, std::string& name, LLUUID&
case MAP_ITEM_MATURE_EVENT:
case MAP_ITEM_ADULT_EVENT:
{
- std::string timeStr = "["+ LLTrans::getString ("TimeHour")+"]:["
- +LLTrans::getString ("TimeMin")+"] ["
- +LLTrans::getString ("TimeAMPM")+"]";
+ std::string timeStr;
+
+ static bool use_24h = gSavedSettings.getBOOL("Use24HourClock");
+ if (use_24h)
+ {
+ timeStr = "[" + LLTrans::getString("TimeHour") + "]:["
+ + LLTrans::getString("TimeMin") + "]";
+ }
+ else
+ {
+ timeStr = "[" + LLTrans::getString("TimeHour12") + "]:["
+ + LLTrans::getString("TimeMin") + "] ["
+ + LLTrans::getString("TimeAMPM") + "]";
+ }
LLSD substitution;
substitution["datetime"] = (S32) extra;
LLStringUtil::format (timeStr, substitution);