From 54d5ff67747ada5c0252a5063c29d6dc0deb074e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 24 Apr 2012 23:00:50 +0100 Subject: Go back to always using the local timezone for now - not all machines have US/Pacific or Olsen Amercia/Los_Angeles and this introduces variability that the server operator cannot control Please see http://opensimulator.org/mantis/view.php?id=5972 soon for more comments. --- OpenSim/Services/LLLoginService/LLLoginResponse.cs | 31 +++++++++++++--------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'OpenSim/Services/LLLoginService') diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index 10a44ed..01de159 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs @@ -351,21 +351,26 @@ namespace OpenSim.Services.LLLoginService { TimeZoneInfo gridTimeZone; - try - { - // First try to fetch DST from Pacific Standard Time, because this is - // the one expected by the viewer. "US/Pacific" is the string to search - // on linux and mac, and should work also on Windows (to confirm) - gridTimeZone = TimeZoneInfo.FindSystemTimeZoneById("US/Pacific"); - } - catch (Exception e) - { - 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); + // Disabled for now pending making timezone a config value, which can at some point have a default of + // a ; separated list of possible timezones. + // The problem here is that US/Pacific (or even the Olsen America/Los_Angeles) is not universal across + // windows, mac and various distributions of linux, introducing another element of consistency. + // The server operator needs to be able to control this setting +// try +// { +// // First try to fetch DST from Pacific Standard Time, because this is +// // the one expected by the viewer. "US/Pacific" is the string to search +// // on linux and mac, and should work also on Windows (to confirm) +// gridTimeZone = TimeZoneInfo.FindSystemTimeZoneById("US/Pacific"); +// } +// catch (Exception e) +// { +// 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); gridTimeZone = TimeZoneInfo.Local; - } +// } DST = gridTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N"; -- cgit v1.1