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.
meow-7.2.2
Leslie Linden 2011-09-08 11:45:12 -07:00
parent 1c7b1532e9
commit ea18429a2c
1 changed files with 5 additions and 3 deletions

View File

@ -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
}