diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-12-07 15:05:57 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-12-07 15:05:57 -0500 |
commit | 3c00c1ba4590e758f84f5c97f2d407aa7e605ad8 (patch) | |
tree | 0d6771596b57ecf87f2504066543b56bbcf65d80 /indra/llcommon/llstring.cpp | |
parent | efe65d90e027e4385c97d76244844fa8660dc7ce (diff) | |
parent | d9b4570883652d647c05083c18fac1a088efd6e2 (diff) |
merge viewer-development into web-profiles
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; |