diff options
author | Oz Linden <oz@lindenlab.com> | 2010-10-15 16:41:30 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2010-10-15 16:41:30 -0400 |
commit | ba2300b8aeff30a64d3f34b0cd5c49aa890e0639 (patch) | |
tree | d7a7f4aa61d1b2bd28374e5c61f3d6730d450574 /indra/llcommon/llstring.cpp | |
parent | a8b5da9a70936923e650bd5c200276da49106784 (diff) | |
parent | 18321756297bd9b04a4204abe4fbb0e3e8112186 (diff) |
pull fix for STORM-211
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; |