Merge pull request #156 from FirestormViewer/improvement/opensim_remove_slt_time
[FIRE-34775] Use PST/PDT time while logged into OpenSim instead of SLTmaster
commit
e364123e04
|
|
@ -1070,6 +1070,7 @@ std::optional<std::string> llstring_getoptenv(const std::string& key)
|
|||
long LLStringOps::sPacificTimeOffset = 0;
|
||||
long LLStringOps::sLocalTimeOffset = 0;
|
||||
bool LLStringOps::sPacificDaylightTime = 0;
|
||||
bool LLStringOps::sUsingPacificTime = false; // <FS:TJ/> [FIRE-34775] Use PST/PDT when logged into OpenSim
|
||||
std::map<std::string, std::string> LLStringOps::datetimeToCodes;
|
||||
|
||||
std::vector<std::string> LLStringOps::sWeekDayList;
|
||||
|
|
@ -1628,12 +1629,21 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
|
|||
}
|
||||
else
|
||||
{
|
||||
#if 0
|
||||
// <FS:TJ> [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";
|
||||
}
|
||||
// </FS:TJ>
|
||||
#else
|
||||
// SL-20370 : Steeltoe Linden : 29/Sep/23
|
||||
// Change "PDT" to "SLT" on menu bar
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ private:
|
|||
static long sPacificTimeOffset;
|
||||
static long sLocalTimeOffset;
|
||||
static bool sPacificDaylightTime;
|
||||
static bool sUsingPacificTime; // <FS:TJ/> [FIRE-34775] Use PST/PDT when logged into OpenSim
|
||||
|
||||
static std::map<std::string, std::string> datetimeToCodes;
|
||||
|
||||
|
|
@ -204,6 +205,9 @@ public:
|
|||
static S32 collate(const llwchar* a, const llwchar* b);
|
||||
|
||||
static void setupDatetimeInfo(bool pacific_daylight_time);
|
||||
// <FS:TJ> [FIRE-34775] Use PST/PDT when logged into OpenSim
|
||||
static void setupUsingPacificTime(bool use_pacific_time) { sUsingPacificTime = use_pacific_time; }
|
||||
// </FS:TJ>
|
||||
|
||||
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;}
|
||||
// <FS:TJ> [FIRE-34775] Use PST/PDT when logged into OpenSim
|
||||
static bool getUsingPacificTime() { return sUsingPacificTime; }
|
||||
// </FS:TJ>
|
||||
|
||||
static std::string getDatetimeCode (std::string key);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
// <FS:TJ> [FIRE-34775] Use PST/PDT when logged into OpenSim
|
||||
LLStringOps::setupUsingPacificTime(LLGridManager::getInstance()->isInOpenSim());
|
||||
// </FS:TJ>
|
||||
}
|
||||
|
||||
// set up the voice configuration. Ultimately, we should pass this up as part of each voice
|
||||
|
|
|
|||
Loading…
Reference in New Issue