diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index bcd5e30b1e..efc9cb6180 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -1070,6 +1070,7 @@ std::optional llstring_getoptenv(const std::string& key) long LLStringOps::sPacificTimeOffset = 0; long LLStringOps::sLocalTimeOffset = 0; bool LLStringOps::sPacificDaylightTime = 0; +bool LLStringOps::sUsingPacificTime = false; // [FIRE-34775] Use PST/PDT when logged into OpenSim std::map LLStringOps::datetimeToCodes; std::vector LLStringOps::sWeekDayList; @@ -1628,12 +1629,21 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token, } else { -#if 0 +// [FIRE-34775] Use PST/PDT when logged into OpenSim +#ifdef OPENSIM // EXT-1565 : Zai Lynch, James Linden : 15/Oct/09 // [BSI] Feedback: Viewer clock mentions SLT, but would prefer it to show PST/PDT // "slt" = Second Life Time, which is deprecated. // If not utc or user local time, fallback to Pacific time - replacement = LLStringOps::getPacificDaylightTime() ? "PDT" : "PST"; + if (LLStringOps::getUsingPacificTime()) + { + replacement = LLStringOps::getPacificDaylightTime() ? "PDT" : "PST"; + } + else + { + replacement = "SLT"; + } +// #else // SL-20370 : Steeltoe Linden : 29/Sep/23 // Change "PDT" to "SLT" on menu bar diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 07615aa027..9375534f3c 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -153,6 +153,7 @@ private: static long sPacificTimeOffset; static long sLocalTimeOffset; static bool sPacificDaylightTime; + static bool sUsingPacificTime; // [FIRE-34775] Use PST/PDT when logged into OpenSim static std::map datetimeToCodes; @@ -204,6 +205,9 @@ public: static S32 collate(const llwchar* a, const llwchar* b); static void setupDatetimeInfo(bool pacific_daylight_time); + // [FIRE-34775] Use PST/PDT when logged into OpenSim + static void setupUsingPacificTime(bool use_pacific_time) { sUsingPacificTime = use_pacific_time; } + // static void setupWeekDaysNames(const std::string& data); static void setupWeekDaysShortNames(const std::string& data); @@ -217,6 +221,9 @@ public: // Is the Pacific time zone (aka server time zone) // currently in daylight savings time? static bool getPacificDaylightTime(void) { return sPacificDaylightTime;} + // [FIRE-34775] Use PST/PDT when logged into OpenSim + static bool getUsingPacificTime() { return sUsingPacificTime; } + // static std::string getDatetimeCode (std::string key); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c693c9ff25..8781a34a04 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -4875,6 +4875,9 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y //setup map of datetime strings to codes and slt & local time offset from utc LLStringOps::setupDatetimeInfo(pacific_daylight_time); + // [FIRE-34775] Use PST/PDT when logged into OpenSim + LLStringOps::setupUsingPacificTime(LLGridManager::getInstance()->isInOpenSim()); + // } // set up the voice configuration. Ultimately, we should pass this up as part of each voice