diff options
| author | Oz Linden <oz@lindenlab.com> | 2010-10-15 16:40:24 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2010-10-15 16:40:24 -0400 |
| commit | 18321756297bd9b04a4204abe4fbb0e3e8112186 (patch) | |
| tree | 01e58c48ac8be93161d4a7002232ea7974637a39 /indra/llcommon/llstring.cpp | |
| parent | cc902e3d24c88bd49c591e81506875c5e3782b08 (diff) | |
| parent | dd69516213fdf20cbc254214e651c4df26afbff7 (diff) | |
pull fix for STORM-279
Diffstat (limited to 'indra/llcommon/llstring.cpp')
| -rw-r--r-- | indra/llcommon/llstring.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index ae7e624a1a..f3b48b0156 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -731,14 +731,17 @@ void LLStringOps::setupDatetimeInfo (bool daylight) nowT = time (NULL); - tmpT = localtime (&nowT); - localT = mktime (tmpT); - tmpT = gmtime (&nowT); gmtT = mktime (tmpT); + tmpT = localtime (&nowT); + localT = mktime (tmpT); + sLocalTimeOffset = (long) (gmtT - localT); - + if (tmpT->tm_isdst) + { + sLocalTimeOffset -= 60 * 60; // 1 hour + } sPacificDaylightTime = daylight; sPacificTimeOffset = (sPacificDaylightTime? 7 : 8 ) * 60 * 60; |
