diff options
| author | Dave SIMmONs <simon@lindenlab.com> | 2010-11-05 13:30:20 -0700 |
|---|---|---|
| committer | Dave SIMmONs <simon@lindenlab.com> | 2010-11-05 13:30:20 -0700 |
| commit | 447dc782fd4d490387fd98e9fb41135038512767 (patch) | |
| tree | b7875f5dd54d4068d777adbe90a3dd36b99a38eb /indra/llcommon/llstring.cpp | |
| parent | d5d4a065275d1db1093111222f29942ee171f81c (diff) | |
| parent | 124a59263184391b0b4ec418c532b7a715e9b5a3 (diff) | |
Merge latest from lindenlab/viewer-development
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; |
