diff options
Diffstat (limited to 'linden/indra/newview/llviewertexteditor.cpp')
-rw-r--r-- | linden/indra/newview/llviewertexteditor.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index 832fdd6..4caf257 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp | |||
@@ -61,6 +61,7 @@ | |||
61 | #include "llmenugl.h" | 61 | #include "llmenugl.h" |
62 | 62 | ||
63 | #include "llappviewer.h" // for gPacificDaylightTime | 63 | #include "llappviewer.h" // for gPacificDaylightTime |
64 | #include "viewertime.h" | ||
64 | 65 | ||
65 | static LLRegisterWidget<LLViewerTextEditor> r("text_editor"); | 66 | static LLRegisterWidget<LLViewerTextEditor> r("text_editor"); |
66 | 67 | ||
@@ -1251,7 +1252,8 @@ std::string LLViewerTextEditor::getEmbeddedText() | |||
1251 | 1252 | ||
1252 | std::string LLViewerTextEditor::appendTime(bool prepend_newline) | 1253 | std::string LLViewerTextEditor::appendTime(bool prepend_newline) |
1253 | { | 1254 | { |
1254 | time_t utc_time; | 1255 | // Format time according to the person's settings -- MC |
1256 | /*time_t utc_time; | ||
1255 | utc_time = time_corrected(); | 1257 | utc_time = time_corrected(); |
1256 | 1258 | ||
1257 | // There's only one internal tm buffer. | 1259 | // There's only one internal tm buffer. |
@@ -1261,7 +1263,15 @@ std::string LLViewerTextEditor::appendTime(bool prepend_newline) | |||
1261 | // it's daylight savings time there. | 1263 | // it's daylight savings time there. |
1262 | timep = utc_to_pacific_time(utc_time, gPacificDaylightTime); | 1264 | timep = utc_to_pacific_time(utc_time, gPacificDaylightTime); |
1263 | 1265 | ||
1264 | std::string text = llformat("[%02d:%02d] ", timep->tm_hour, timep->tm_min); | 1266 | text = llformat("[%02d:%02d] ", timep->tm_hour, timep->tm_min); |
1267 | appendColoredText(text, false, prepend_newline, LLColor4::grey);*/ | ||
1268 | std::string text = llformat("[%02d:%02d", gViewerTime->getCurHour(), gViewerTime->getCurMin()); | ||
1269 | if (!gViewerTime->getCurAMPM().empty()) | ||
1270 | { | ||
1271 | text += " "; | ||
1272 | text += gViewerTime->getCurAMPM(); | ||
1273 | } | ||
1274 | text += "] "; | ||
1265 | appendColoredText(text, false, prepend_newline, LLColor4::grey); | 1275 | appendColoredText(text, false, prepend_newline, LLColor4::grey); |
1266 | 1276 | ||
1267 | return text; | 1277 | return text; |