aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/viewertime.cpp
diff options
context:
space:
mode:
authorRevolutionSmythe2010-10-20 16:31:09 -0500
committerMcCabe Maxsted2010-11-01 16:58:02 -0700
commitaf6877fbfe94e80948c559cf77f008049f8168dc (patch)
tree4fe687aaec6a1b964a0e989d3c03c143b4ab07f6 /linden/indra/newview/viewertime.cpp
parentMerge remote branch 'thickbrick/weekly' into weekly (diff)
downloadmeta-impy-af6877fbfe94e80948c559cf77f008049f8168dc.zip
meta-impy-af6877fbfe94e80948c559cf77f008049f8168dc.tar.gz
meta-impy-af6877fbfe94e80948c559cf77f008049f8168dc.tar.bz2
meta-impy-af6877fbfe94e80948c559cf77f008049f8168dc.tar.xz
Finishes the OpenRegionSettings module, adds a new panel to Region/Estate for OpenRegionSettings, adds the new CAPS based WindLight Settings module, cleans up a few UI parts, and rebuilds the ToS window to support OpenSim regions better.
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/viewertime.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/linden/indra/newview/viewertime.cpp b/linden/indra/newview/viewertime.cpp
index 06dd91a..06436b6 100644
--- a/linden/indra/newview/viewertime.cpp
+++ b/linden/indra/newview/viewertime.cpp
@@ -47,6 +47,9 @@ ViewerTime* gViewerTime = 0;
47// We use statics here for speed reasons 47// We use statics here for speed reasons
48bool ViewerTime::sUse24HourTime = false; 48bool ViewerTime::sUse24HourTime = false;
49bool ViewerTime::sUseUTCTime = false; 49bool ViewerTime::sUseUTCTime = false;
50bool ViewerTime::sUseTimeOffset = false;
51S32 ViewerTime::sTimeOffset = 0;
52bool ViewerTime::sTimeOffsetDST = false;
50 53
51std::vector<std::string> ViewerTime::sDays; 54std::vector<std::string> ViewerTime::sDays;
52std::vector<std::string> ViewerTime::sMonths; 55std::vector<std::string> ViewerTime::sMonths;
@@ -87,16 +90,21 @@ void ViewerTime::refresh()
87 // There's only one internal tm buffer. 90 // There's only one internal tm buffer.
88 struct tm* internal_time; 91 struct tm* internal_time;
89 92
90 if (!sUseUTCTime) 93 if (sUseUTCTime)
91 { 94 {
92 // Convert to Pacific, based on server's opinion of whether 95 time(&utc_time);
93 // it's daylight savings time there. 96 internal_time = gmtime(&utc_time);
94 internal_time = utc_to_pacific_time(utc_time, gPacificDaylightTime); 97 }
98 else if (sUseTimeOffset)
99 {
100 //Its a UTC offset, deal with it
101 internal_time = utc_to_offset_time(utc_time, sTimeOffset, sTimeOffsetDST);
95 } 102 }
96 else 103 else
97 { 104 {
98 time(&utc_time); 105 // Convert to Pacific, based on server's opinion of whether
99 internal_time = gmtime(&utc_time); 106 // it's daylight savings time there.
107 internal_time = utc_to_pacific_time(utc_time, gPacificDaylightTime);
100 } 108 }
101 109
102 mMinute = internal_time->tm_min; 110 mMinute = internal_time->tm_min;