summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-27 14:56:29 -0700
committerJames Cook <james@lindenlab.com>2010-05-27 14:56:29 -0700
commitc7a6a2e08f34b2cd21816a905c21e8017646001c (patch)
tree296ca43bd0267418649f0de8d2ee100e360736b0 /indra/llcommon/llstring.cpp
parent5250ac075a2bf2ce6712acdb908432229b110c1a (diff)
DEV-50013 Friendlier info if you can't change name due to time lockout
Reviewed with Leyla
Diffstat (limited to 'indra/llcommon/llstring.cpp')
-rw-r--r--indra/llcommon/llstring.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index b5a73ec1d1..637064d75f 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -694,14 +694,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;