summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmarketplaceinboxinventory.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-09-21 14:25:48 -0700
committerMerov Linden <merov@lindenlab.com>2011-09-21 14:25:48 -0700
commit5ae6bbc848e0146bb4b5ea5dd4a5d26d2c5702ba (patch)
treecfd1c052aef51bfa95298613a95fc78f64c3aefc /indra/newview/llpanelmarketplaceinboxinventory.cpp
parent7bc6e626f40a910b4a3e5b88161e96b9967bd24d (diff)
parent305b65f6f600b81de9a78e1246d2a5353cc3189b (diff)
EXP-1207 : merge with viewer-experience-fui
Diffstat (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp')
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index d51aa73c93..faba6dc0cf 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -192,20 +192,19 @@ void LLInboxFolderViewFolder::draw()
void LLInboxFolderViewFolder::computeFreshness()
{
- const std::string& last_expansion = gSavedPerAccountSettings.getString("LastInventoryInboxActivity");
+ const U32 last_expansion_utc = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity");
- if (!last_expansion.empty())
+ if (last_expansion_utc > 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;
+ const U32 time_offset_for_pdt = 7 * 60 * 60;
+ const U32 last_expansion = last_expansion_utc - time_offset_for_pdt;
- 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 +218,7 @@ void LLInboxFolderViewFolder::deFreshify()
{
mFresh = false;
- gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString());
+ gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
void LLInboxFolderViewFolder::selectItem()