From 0a0e1ea0b18c62c32ddce7c8243268be040405a1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 14 Nov 2024 22:29:32 +0000 Subject: [PATCH] prim inv item creation date is date of adding to prim --- OpenSim/Framework/TaskInventoryItem.cs | 2 +- .../Framework/Scenes/SceneObjectGroup.Inventory.cs | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index 68e2babe2d..26e7f3bd0e 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs @@ -172,7 +172,7 @@ namespace OpenSim.Framework public TaskInventoryItem() { ScriptRunning = true; - CreationDate = (uint)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; + CreationDate = (uint)Util.UnixTimeSinceEpoch(); } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 88605ac433..7d95ce74df 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs @@ -135,19 +135,17 @@ namespace OpenSim.Region.Framework.Scenes /// public bool AddInventoryItem(UUID agentID, uint localID, InventoryItemBase item, UUID copyItemID, bool withModRights = true) { -// m_log.DebugFormat( -// "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}", -// item.Name, remoteClient.Name, localID); + //m_log.DebugFormat( + // "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}", + // item.Name, remoteClient.Name, localID); UUID newItemId = copyItemID.IsZero() ? item.ID : copyItemID; SceneObjectPart part = GetPart(localID); if (part is null) { - m_log.ErrorFormat( - "[PRIM INVENTORY]: " + - "Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}", - localID, Name, UUID, newItemId); + m_log.Error( + $"[PRIM INVENTORY]: Couldn't find prim local ID {localID} in group {Name}, {UUID} to add inventory item ID {newItemId}"); return false; } @@ -156,6 +154,7 @@ namespace OpenSim.Region.Framework.Scenes ItemID = newItemId, AssetID = item.AssetID, Name = item.Name, + //CreationDate = (uint)Util.UnixTimeSinceEpoch(), Description = item.Description, OwnerID = part.OwnerID, // Transfer ownership CreatorID = item.CreatorIdAsUuid, @@ -193,7 +192,6 @@ namespace OpenSim.Region.Framework.Scenes // TODO: These are pending addition of those fields to TaskInventoryItem // taskItem.SalePrice = item.SalePrice; // taskItem.SaleType = item.SaleType; - taskItem.CreationDate = (uint)item.CreationDate; bool addFromAllowedDrop; if(withModRights)