diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs index 347708def6..feb5fb8995 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs @@ -156,31 +156,32 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage return; } - DateTime dt = DateTime.UtcNow; + //DateTime dt = DateTime.UtcNow; // Ticks from UtcNow, but make it look like local. Evil, huh? - dt = DateTime.SpecifyKind(dt, DateTimeKind.Local); + //dt = DateTime.SpecifyKind(dt, DateTimeKind.Local); - try - { - // Convert that to the PST timezone - TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("America/Los_Angeles"); - dt = TimeZoneInfo.ConvertTime(dt, timeZoneInfo); - } - catch - { - //m_log.Info("[OFFLINE MESSAGING]: No PST timezone found on this machine. Saving with local timestamp."); - } + //try + //{ + // // Convert that to the PST timezone + // TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("America/Los_Angeles"); + // dt = TimeZoneInfo.ConvertTime(dt, timeZoneInfo); + //} + //catch + //{ + // //m_log.Info("[OFFLINE MESSAGING]: No PST timezone found on this machine. Saving with local timestamp."); + //} - // And make it look local again to fool the unix time util - dt = DateTime.SpecifyKind(dt, DateTimeKind.Utc); - - im.timestamp = (uint)Util.ToUnixTime(dt); + //// And make it look local again to fool the unix time util + //dt = DateTime.SpecifyKind(dt, DateTimeKind.Utc); // If client is null, this message comes from storage and IS offline if (client != null) im.offline = 0; + if (im.offline == 0) + im.timestamp = (uint)Util.UnixTimeSinceEpoch(); + if (m_TransferModule != null) { if (client != null) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index f06fd2437b..613d7046f5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3283,26 +3283,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here // m_log.Debug("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); // m_log.Debug("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); - DateTime dt = DateTime.UtcNow; +// DateTime dt = DateTime.UtcNow; +// +// // Ticks from UtcNow, but make it look like local. Evil, huh? +// dt = DateTime.SpecifyKind(dt, DateTimeKind.Local); +// +// try +// { +// // Convert that to the PST timezone +// TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("America/Los_Angeles"); +// dt = TimeZoneInfo.ConvertTime(dt, timeZoneInfo); +// } +// catch +// { +// // No logging here, as it could be VERY spammy +// } +// +// // And make it look local again to fool the unix time util +// dt = DateTime.SpecifyKind(dt, DateTimeKind.Utc); - // Ticks from UtcNow, but make it look like local. Evil, huh? - dt = DateTime.SpecifyKind(dt, DateTimeKind.Local); - - try - { - // Convert that to the PST timezone - TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("America/Los_Angeles"); - dt = TimeZoneInfo.ConvertTime(dt, timeZoneInfo); - } - catch - { - // No logging here, as it could be VERY spammy - } - - // And make it look local again to fool the unix time util - dt = DateTime.SpecifyKind(dt, DateTimeKind.Utc); - - msg.timestamp = (uint)Util.ToUnixTime(dt); + msg.timestamp = (uint)Util.UnixTimeSinceEpoch(); //if (client != null) //{