From d5b33852e8cfe310bbc37c8a18f2e91a66a76bb0 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 14 Jul 2010 00:59:31 -0700 Subject: Applied SNOW-629 Fix: Leading zero missing from hour portion of timestamp field in local chat history and log file. Patch by Ardy Lay --- linden/indra/newview/lllogchat.cpp | 4 ++-- linden/indra/newview/llviewertexteditor.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/lllogchat.cpp b/linden/indra/newview/lllogchat.cpp index 62504d6..fb8a450 100644 --- a/linden/indra/newview/lllogchat.cpp +++ b/linden/indra/newview/lllogchat.cpp @@ -73,9 +73,9 @@ std::string LLLogChat::timestamp(bool withdate) 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); + text = llformat("[%d/%02d/%02d %02d:%02d] ", (timep->tm_year-100)+2000, timep->tm_mon+1, timep->tm_mday, timep->tm_hour, timep->tm_min); else - text = llformat("[%d:%02d] ", timep->tm_hour, timep->tm_min); + text = llformat("[%02d:%02d] ", timep->tm_hour, timep->tm_min); return text; } diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index e5e2cd6..832fdd6 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp @@ -1261,7 +1261,7 @@ std::string LLViewerTextEditor::appendTime(bool prepend_newline) // it's daylight savings time there. timep = utc_to_pacific_time(utc_time, gPacificDaylightTime); - std::string text = llformat("[%d:%02d] ", timep->tm_hour, timep->tm_min); + std::string text = llformat("[%02d:%02d] ", timep->tm_hour, timep->tm_min); appendColoredText(text, false, prepend_newline, LLColor4::grey); return text; -- cgit v1.1