diff options
author | Jacek Antonelli | 2008-08-15 23:44:59 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:59 -0500 |
commit | a408bac29378072fbf36864164149458c978cfcc (patch) | |
tree | 67feccf1a5d3816611ba48d6762f86f0f7f4b1f6 /linden/indra/newview/lllogchat.cpp | |
parent | Second Life viewer sources 1.17.0.12 (diff) | |
download | meta-impy-a408bac29378072fbf36864164149458c978cfcc.zip meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.gz meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.bz2 meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.xz |
Second Life viewer sources 1.17.1.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lllogchat.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/linden/indra/newview/lllogchat.cpp b/linden/indra/newview/lllogchat.cpp index aaa19ea..ec9b9f5 100644 --- a/linden/indra/newview/lllogchat.cpp +++ b/linden/indra/newview/lllogchat.cpp | |||
@@ -29,18 +29,40 @@ | |||
29 | #include "llviewerprecompiledheaders.h" | 29 | #include "llviewerprecompiledheaders.h" |
30 | 30 | ||
31 | #include "lllogchat.h" | 31 | #include "lllogchat.h" |
32 | 32 | #include "viewer.h" | |
33 | |||
33 | const S32 LOG_RECALL_SIZE = 2048; | 34 | const S32 LOG_RECALL_SIZE = 2048; |
34 | 35 | ||
35 | //static | 36 | //static |
36 | LLString LLLogChat::makeLogFileName(LLString filename) | 37 | LLString LLLogChat::makeLogFileName(LLString filename) |
37 | { | 38 | { |
38 | |||
39 | filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS,filename.c_str()); | 39 | filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS,filename.c_str()); |
40 | filename += ".txt"; | 40 | filename += ".txt"; |
41 | return filename; | 41 | return filename; |
42 | } | 42 | } |
43 | 43 | ||
44 | LLString LLLogChat::timestamp(bool withdate) | ||
45 | { | ||
46 | U32 utc_time; | ||
47 | utc_time = time_corrected(); | ||
48 | |||
49 | // There's only one internal tm buffer. | ||
50 | struct tm* timep; | ||
51 | |||
52 | // Convert to Pacific, based on server's opinion of whether | ||
53 | // it's daylight savings time there. | ||
54 | timep = utc_to_pacific_time(utc_time, gPacificDaylightTime); | ||
55 | |||
56 | LLString text; | ||
57 | if (withdate) | ||
58 | 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); | ||
59 | else | ||
60 | text = llformat("[%d:%02d] ", timep->tm_hour, timep->tm_min); | ||
61 | |||
62 | return text; | ||
63 | } | ||
64 | |||
65 | |||
44 | //static | 66 | //static |
45 | void LLLogChat::saveHistory(LLString filename, LLString line) | 67 | void LLLogChat::saveHistory(LLString filename, LLString line) |
46 | { | 68 | { |