diff options
| author | Erik Kundiman <erik@megapahit.org> | 2025-03-21 16:04:33 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2025-03-21 19:36:44 +0800 |
| commit | 2fb48eb9be6df00c3baed955fd84f4d8a1ea1d9a (patch) | |
| tree | b6ba5ff2c3ebc24477e3c6d701f91672c7499132 /indra/llcommon/lldate.cpp | |
| parent | 0cdb7d97f67b3a67097e56e71021cb6120ec8a8b (diff) | |
| parent | 895a6739d3d02e11750e9ada72b730d02998d4c0 (diff) | |
Merge tag 'Second_Life_Release#895a6739-2025.03' into 2025.03
Diffstat (limited to 'indra/llcommon/lldate.cpp')
| -rw-r--r-- | indra/llcommon/lldate.cpp | 9 |
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; |
