diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-09-04 00:16:51 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-09-04 00:16:51 +0000 |
commit | 2273376dffb80af0cbf1bc1d8cc8990e1d1456f3 (patch) | |
tree | c2d37601075d4be20db4d8cc12e36c4f6bc0f2e1 /indra/llcommon/lldate.cpp | |
parent | f03db936f892c8b8e58182a90afd4adba2482bdc (diff) |
DEV-39441 - Eliminate boost:regexp from LLString::format
Also removed a missing setting (merge bug)
Diffstat (limited to 'indra/llcommon/lldate.cpp')
-rw-r--r-- | indra/llcommon/lldate.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index 7bc9e16bc9..6a82a848be 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -94,8 +94,12 @@ std::string LLDate::asRFC1123() const return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT")); } +LLFastTimer::DeclareTimer FT_DATE_FORMAT("Date Format"); + std::string LLDate::toHTTPDateString (std::string fmt) const { + LLFastTimer ft1(FT_DATE_FORMAT); + std::ostringstream stream; time_t locSeconds = (time_t) mSecondsSinceEpoch; struct tm * gmt = gmtime (&locSeconds); @@ -107,6 +111,8 @@ std::string LLDate::toHTTPDateString (std::string fmt) const std::string LLDate::toHTTPDateString (tm * gmt, std::string fmt) { + LLFastTimer ft1(FT_DATE_FORMAT); + std::ostringstream stream; stream.imbue (std::locale(LLStringUtil::getLocale().c_str())); toHTTPDateStream (stream, gmt, fmt); @@ -115,11 +121,11 @@ std::string LLDate::toHTTPDateString (tm * gmt, std::string fmt) void LLDate::toHTTPDateStream(std::ostream& s, tm * gmt, std::string fmt) { - using namespace std; + LLFastTimer ft1(FT_DATE_FORMAT); const char * pBeg = fmt.c_str(); const char * pEnd = pBeg + fmt.length(); - const time_put<char>& tp = use_facet<time_put<char> >(s.getloc()); + const std::time_put<char>& tp = std::use_facet<std::time_put<char> >(s.getloc()); tp.put (s, s, s.fill(), gmt, pBeg, pEnd); } |