summaryrefslogtreecommitdiff
path: root/indra/llcommon/lldate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/lldate.cpp')
-rw-r--r--indra/llcommon/lldate.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp
index 5f51f40232..4ff56ae8c8 100644
--- a/indra/llcommon/lldate.cpp
+++ b/indra/llcommon/lldate.cpp
@@ -79,6 +79,15 @@ std::string LLDate::asRFC1123() const
return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT"));
}
+std::string LLDate::toLocalDateString (std::string fmt) const
+{
+ LL_PROFILE_ZONE_SCOPED;
+
+ time_t locSeconds = (time_t) mSecondsSinceEpoch;
+ struct tm * lt = localtime (&locSeconds);
+ return toHTTPDateString(lt, fmt);
+}
+
std::string LLDate::toHTTPDateString (std::string fmt) const
{
LL_PROFILE_ZONE_SCOPED;