From ea18429a2c3b76aee4293f0031b8b5d5a8ee9aba Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 8 Sep 2011 11:45:12 -0700 Subject: EXP-1194 FIX -- Update New tag behavior to update Newness timestamp when Received Items panel is open and do not auto open Received Items panel The freshness calculation now takes into account the timezone difference between LLDate's return value of GMT and the inventory server's GMT-7 times. --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 47f34434db..ac517f3f3e 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -196,14 +196,16 @@ void LLInboxFolderViewFolder::computeFreshness() if (!last_expansion.empty()) { - LLDate saved_freshness_date = LLDate(last_expansion); + // Inventory DB timezone is hardcoded to PDT or GMT-7, which is 7 hours behind GMT + const time_t SEVEN_HOURS_IN_SECONDS = 7 * 60 * 60; + const time_t saved_freshness_inventory_db_timezone = LLDate(last_expansion).secondsSinceEpoch() - SEVEN_HOURS_IN_SECONDS; - mFresh = (mCreationDate > saved_freshness_date.secondsSinceEpoch()); + mFresh = (mCreationDate > saved_freshness_inventory_db_timezone); #if DEBUGGING_FRESHNESS if (mFresh) { - llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << saved_freshness_date.secondsSinceEpoch() << llendl; + llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << saved_freshness_inventory_db_timezone << llendl; } #endif } -- cgit v1.2.3