diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginResponse.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index 844c5ae..8fdcf4e 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs | |||
@@ -349,7 +349,21 @@ namespace OpenSim.Services.LLLoginService | |||
349 | 349 | ||
350 | private void SetDefaultValues() | 350 | private void SetDefaultValues() |
351 | { | 351 | { |
352 | DST = TimeZone.CurrentTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N"; | 352 | TimeZoneInfo gridTimeZone; |
353 | try | ||
354 | { | ||
355 | // First try to fetch DST from Pacific Standard Time, because this is | ||
356 | // the one expected by the viewer. "US/Pacific" is the string to search | ||
357 | // on linux and mac, and should work also on Windows (to confirm) | ||
358 | gridTimeZone = TimeZoneInfo.FindSystemTimeZoneById("US/Pacific"); | ||
359 | } | ||
360 | catch (Exception e) | ||
361 | { | ||
362 | m_log.WarnFormat("[TIMEZONE]: {0} Falling back to system time. System time should be set to Pacific Standard Time to provide the expected time", e.Message); | ||
363 | gridTimeZone = TimeZoneInfo.Local; | ||
364 | } | ||
365 | DST = gridTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N"; | ||
366 | |||
353 | StipendSinceLogin = "N"; | 367 | StipendSinceLogin = "N"; |
354 | Gendered = "Y"; | 368 | Gendered = "Y"; |
355 | EverLoggedIn = "Y"; | 369 | EverLoggedIn = "Y"; |