summaryrefslogtreecommitdiff
path: root/indra/llcommon/lldate.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2025-03-11 22:44:49 -0400
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2025-03-11 22:44:49 -0400
commite0d14e02e152b4e75ff8bdd974677f9669163d68 (patch)
tree3379d14c9c5d8c188d2fb716e61edd09fc1219a9 /indra/llcommon/lldate.cpp
parent179b29252d8bb28e11686a1852c8e8ffcd98ecc0 (diff)
parentb50ad90febda24d2296541f46ea1a129232aad70 (diff)
Merge branch 'release/2025.03' into rye/forevermac
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 b38864688d..5205699b92 100644
--- a/indra/llcommon/lldate.cpp
+++ b/indra/llcommon/lldate.cpp
@@ -77,6 +77,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;