aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
authorRevolutionSmythe2011-03-18 19:26:19 -0500
committerRevolutionSmythe2011-03-18 20:07:48 -0500
commit44aecbf4eca7c2d94ed88f11dedd237e93b01010 (patch)
treeac01cd12fca634c3a47a7b8c5293440e18caaa9f /linden/indra/newview
parentMerge in Var Sized Regions into the Imprudence Experimental. (diff)
downloadmeta-impy-44aecbf4eca7c2d94ed88f11dedd237e93b01010.zip
meta-impy-44aecbf4eca7c2d94ed88f11dedd237e93b01010.tar.gz
meta-impy-44aecbf4eca7c2d94ed88f11dedd237e93b01010.tar.bz2
meta-impy-44aecbf4eca7c2d94ed88f11dedd237e93b01010.tar.xz
Fix setting the viewer offset time from OpenRegionSettings, and also have it show what UTC offset it is representing in the time bar.
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/kowopenregionsettings.cpp6
-rw-r--r--linden/indra/newview/viewertime.cpp18
2 files changed, 19 insertions, 5 deletions
diff --git a/linden/indra/newview/kowopenregionsettings.cpp b/linden/indra/newview/kowopenregionsettings.cpp
index ef14d2a..0c4bb38 100644
--- a/linden/indra/newview/kowopenregionsettings.cpp
+++ b/linden/indra/newview/kowopenregionsettings.cpp
@@ -37,6 +37,7 @@
37#include "llfloaterregioninfo.h" 37#include "llfloaterregioninfo.h"
38#include "llfloaterworldmap.h" 38#include "llfloaterworldmap.h"
39#include "llvoiceclient.h" 39#include "llvoiceclient.h"
40#include "viewertime.h"
40 41
41//DEBUG includes 42//DEBUG includes
42//#include "llsdserialize.h" //LLSDNotationStreamer - for dumping LLSD to string 43//#include "llsdserialize.h" //LLSDNotationStreamer - for dumping LLSD to string
@@ -150,12 +151,15 @@ class OpenRegionInfoUpdate : public LLHTTPNode
150 } 151 }
151 if ( body.has("OffsetOfUTC") ) 152 if ( body.has("OffsetOfUTC") )
152 { 153 {
153 gSavedSettings.setS32("TimeOffset", body["OffsetOfUTC"].asReal()); 154 gSavedSettings.setS32("TimeOffset", body["OffsetOfUTC"].asInteger());
154 gSavedSettings.setBOOL("UseTimeOffset", true); 155 gSavedSettings.setBOOL("UseTimeOffset", true);
156 ViewerTime::sUseTimeOffset = true;
157 ViewerTime::sTimeOffset = gSavedSettings.getS32("TimeOffset");
155 } 158 }
156 if ( body.has("OffsetOfUTCDST") ) 159 if ( body.has("OffsetOfUTCDST") )
157 { 160 {
158 gSavedSettings.setBOOL("TimeOffsetDST", body["OffsetOfUTCDST"].asInteger() == 1 ? TRUE : FALSE); 161 gSavedSettings.setBOOL("TimeOffsetDST", body["OffsetOfUTCDST"].asInteger() == 1 ? TRUE : FALSE);
162 ViewerTime::sTimeOffsetDST = gSavedSettings.getBOOL("TimeOffsetDST");
159 } 163 }
160 if ( body.has("RenderWater") ) 164 if ( body.has("RenderWater") )
161 { 165 {
diff --git a/linden/indra/newview/viewertime.cpp b/linden/indra/newview/viewertime.cpp
index 06436b6..8a65a23 100644
--- a/linden/indra/newview/viewertime.cpp
+++ b/linden/indra/newview/viewertime.cpp
@@ -27,7 +27,8 @@
27* COMPLETENESS OR PERFORMANCE. 27* COMPLETENESS OR PERFORMANCE.
28* $/LicenseInfo$ 28* $/LicenseInfo$
29*/ 29*/
30 30
31#include <sstream>
31#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
32 33
33#include "llappviewer.h" // for gPacificDaylightTime 34#include "llappviewer.h" // for gPacificDaylightTime
@@ -129,10 +130,19 @@ void ViewerTime::refresh()
129 if (hour == 0) hour = 12; 130 if (hour == 0) hour = 12;
130 } 131 }
131 132
132 mTZ = "PST"; 133 if (sUseTimeOffset)
133 if (gPacificDaylightTime) 134 {
135 std::stringstream myString;
136 myString << "UTC " << sTimeOffset;
137 mTZ = myString.str();
138 }
139 else
134 { 140 {
135 mTZ = "PDT"; 141 mTZ = "PST";
142 if (gPacificDaylightTime)
143 {
144 mTZ = "PDT";
145 }
136 } 146 }
137 } 147 }
138 else // just UTC 148 else // just UTC