Skip to content

Commit

Permalink
Correct commit: faca949
Browse files Browse the repository at this point in the history
- Fix the reference to Pacific Standard Time which I accidentally re-inserted.
- Make sure we now use UtcNow and not just DateTime.Now

Signed-Off-By: NoahStarfinder<noah@secondgalaxy.com>
  • Loading branch information
NoahStarfinder committed Jul 21, 2017
1 parent e4be161 commit 7078a86
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Universe/Modules/World/GlobalEnvironment/SunModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public void Initialize(IConfigSource config)
public void AddRegion(IScene scene)
{
m_scene = scene;

// This one enables the ability to type just "sun" without any parameters
if (MainConsole.Instance != null)
{
Expand All @@ -173,8 +174,15 @@ public void AddRegion(IScene scene)
}
}

TimeZone local = TimeZone.CurrentTimeZone;
TicksUTCOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.UtcNow)).Ticks;
//MainConsole.Instance.Debug("[Sun]: localtime offset is " + TicksUTCOffset);

// July 21, 2017 - NoahStarfinder
// We don't actually use the Pacific Standard Time zone at all.
// It should really be based upon the local time zone of the serverr hardware.
// Use a fixed offset from UTC for Pacific time with no DST changes. Must be a specific unchanging offset, could be 0.
TicksUTCOffset = -288000000000; // -8 * 60 * 60 * TICKS_PER_SECOND
//TicksUTCOffset = -288000000000; // -8 * 60 * 60 * TICKS_PER_SECOND

// Align ticks with Second Life
TicksToEpoch = new DateTime(1970, 1, 1).Ticks;
Expand Down

0 comments on commit 7078a86

Please sign in to comment.