From ba96fb5c2b6801398481a30189f991cff98fed8b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 12 Sep 2011 16:06:58 -0700 Subject: EXP-1199 FIX -- Inbox new tag sometimes differs from recent item delivery times, sim timezone settings differences suspected. * LastInventoryInboxActivity setting now stored as the value of time_correct(), the corrected time difference (established at login) between the client and official SL time. --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index d51aa73c93..f525dbf434 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -192,20 +192,16 @@ void LLInboxFolderViewFolder::draw() void LLInboxFolderViewFolder::computeFreshness() { - const std::string& last_expansion = gSavedPerAccountSettings.getString("LastInventoryInboxActivity"); + const U32 last_expansion = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity"); - if (!last_expansion.empty()) + if (last_expansion > 0) { - // Inventory DB timezone is hardcoded to PDT or GMT-7, which is 7 hours behind GMT - const F64 SEVEN_HOURS_IN_SECONDS = 7 * 60 * 60; - const F64 saved_freshness_inventory_db_timezone = LLDate(last_expansion).secondsSinceEpoch() - SEVEN_HOURS_IN_SECONDS; - - mFresh = (mCreationDate > saved_freshness_inventory_db_timezone); + mFresh = (mCreationDate > last_expansion); #if DEBUGGING_FRESHNESS if (mFresh) { - llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << saved_freshness_inventory_db_timezone << llendl; + llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion << llendl; } #endif } @@ -219,7 +215,7 @@ void LLInboxFolderViewFolder::deFreshify() { mFresh = false; - gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString()); + gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } void LLInboxFolderViewFolder::selectItem() -- cgit v1.2.3 From 6a2eda0f34519f0c3d10683f144a21da6edbf220 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 14 Sep 2011 16:42:00 -0700 Subject: EXP-1199 FIX -- Inbox new tag sometimes differs from recent item delivery times, sim timezone settings differences suspected. * Put 7 hour time difference back in to account for PDT vs GMT inventory server time --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index f525dbf434..faba6dc0cf 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -192,10 +192,13 @@ void LLInboxFolderViewFolder::draw() void LLInboxFolderViewFolder::computeFreshness() { - const U32 last_expansion = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity"); + const U32 last_expansion_utc = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity"); - if (last_expansion > 0) + if (last_expansion_utc > 0) { + const U32 time_offset_for_pdt = 7 * 60 * 60; + const U32 last_expansion = last_expansion_utc - time_offset_for_pdt; + mFresh = (mCreationDate > last_expansion); #if DEBUGGING_FRESHNESS -- cgit v1.2.3