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.
0.7.4.1
Justin Clark-Casey (justincc) 2012-04-24 23:00:50 +01:00
parent ef1668adb3
commit 54d5ff6774
1 changed files with 18 additions and 13 deletions

View File

@ -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";