diff options
author | Merov Linden <merov@lindenlab.com> | 2010-11-04 18:09:35 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2010-11-04 18:09:35 -0700 |
commit | ba3307b8d0f2ceb40454174a6593f3f98ce98b65 (patch) | |
tree | 7c016ab72795543361d206de5344b34a6a823fdf /indra/llcommon/llstring.cpp | |
parent | dac53830f1a67c8657ced9c39eccedbadf149bd9 (diff) | |
parent | 40979589afc5c91cab977307a1e400315b1c8a8f (diff) |
merge with STORM-105
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; |