summaryrefslogtreecommitdiff
path: root/indra/newview/lllogchat.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-05-08 07:43:08 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-05-08 07:43:08 +0000
commita4000c3744e42fcbb638e742f3b63fa31a0dee15 (patch)
tree7f472c30e65bbfa04ee9bc06631a1af305cc31fb /indra/newview/lllogchat.cpp
parent6c4cadbb04d633ad7b762058bdeba6e1f650dafd (diff)
merge trunk@116587 skinning-7@119389 -> viewer-2.0.0-skinning-7
Diffstat (limited to 'indra/newview/lllogchat.cpp')
-rw-r--r--indra/newview/lllogchat.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 1709d6465d..29cf996f7c 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -35,6 +35,7 @@
#include "lllogchat.h"
#include "llappviewer.h"
#include "llfloaterchat.h"
+#include "lltrans.h"
const S32 LOG_RECALL_SIZE = 2048;
@@ -64,20 +65,21 @@ std::string LLLogChat::timestamp(bool withdate)
time_t utc_time;
utc_time = time_corrected();
- // There's only one internal tm buffer.
- struct tm* timep;
+ std::string timeStr;
+ LLSD substitution;
+ substitution["datetime"] = (S32) utc_time;
- // Convert to Pacific, based on server's opinion of whether
- // it's daylight savings time there.
- timep = utc_to_pacific_time(utc_time, gPacificDaylightTime);
-
- std::string text;
if (withdate)
- text = llformat("[%d/%02d/%02d %d:%02d] ", (timep->tm_year-100)+2000, timep->tm_mon+1, timep->tm_mday, timep->tm_hour, timep->tm_min);
+ {
+ timeStr = LLTrans::getString ("LogChatDateTime");
+ }
else
- text = llformat("[%d:%02d] ", timep->tm_hour, timep->tm_min);
+ {
+ timeStr = LLTrans::getString ("LogChatTime");
+ }
- return text;
+ LLStringUtil::format (timeStr, substitution);
+ return timeStr;
}
@@ -114,7 +116,7 @@ void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType
LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r"); /*Flawfinder: ignore*/
if (!fptr)
{
- //LLUIString message = LLFloaterChat::getInstance()->getString("IM_logging_string");
+ //LLUIString message = LLTrans::getString("IM_logging_string");
//callback(LOG_EMPTY,"IM_logging_string",userdata);
callback(LOG_EMPTY,LLStringUtil::null,userdata);
return; //No previous conversation with this name.