From 5865a2b8f8bbafe6e55a91f6f716c13a0ef7adb6 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 21 Oct 2008 00:44:57 +0000 Subject: [PATCH] Set a default creation date on inventory and task inventory items --- OpenSim/Framework/InventoryItemBase.cs | 6 ++++++ OpenSim/Framework/TaskInventoryItem.cs | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index d165d862cd..25cef3f350 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using OpenMetaverse; namespace OpenSim.Framework @@ -236,5 +237,10 @@ namespace OpenSim.Framework get { return _creationDate; } set { _creationDate = value; } } + + public InventoryItemBase() + { + _creationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; + } } } diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index 45b806ef2f..fdb1137890 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs @@ -336,5 +336,10 @@ namespace OpenSim.Framework _itemID = UUID.Random(); _parentPartID = partID; } + + public TaskInventoryItem() + { + _creationDate = (uint)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; + } } }