diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 11d7c2b..f153504 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3252,7 +3252,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3252 | msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here | 3252 | msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here |
3253 | // m_log.Debug("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); | 3253 | // m_log.Debug("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); |
3254 | // m_log.Debug("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); | 3254 | // m_log.Debug("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); |
3255 | msg.timestamp = (uint)Util.UnixTimeSinceEpoch();// timestamp; | 3255 | DateTime dt = DateTime.UtcNow; |
3256 | |||
3257 | // Ticks from UtcNow, but make it look like local. Evil, huh? | ||
3258 | dt = DateTime.SpecifyKind(dt, DateTimeKind.Local); | ||
3259 | |||
3260 | try | ||
3261 | { | ||
3262 | // Convert that to the PST timezone | ||
3263 | TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("America/Los_Angeles"); | ||
3264 | dt = TimeZoneInfo.ConvertTime(dt, timeZoneInfo); | ||
3265 | } | ||
3266 | catch | ||
3267 | { | ||
3268 | // No logging here, as it could be VERY spammy | ||
3269 | } | ||
3270 | |||
3271 | // And make it look local again to fool the unix time util | ||
3272 | dt = DateTime.SpecifyKind(dt, DateTimeKind.Utc); | ||
3273 | |||
3274 | msg.timestamp = (uint)Util.ToUnixTime(dt); | ||
3275 | |||
3256 | //if (client != null) | 3276 | //if (client != null) |
3257 | //{ | 3277 | //{ |
3258 | msg.fromAgentName = m_host.Name;//client.FirstName + " " + client.LastName;// fromAgentName; | 3278 | msg.fromAgentName = m_host.Name;//client.FirstName + " " + client.LastName;// fromAgentName; |