diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp
index 7b589f5b96..b93dd4241e 100755
--- a/indra/llvfs/llvfs.cpp
+++ b/indra/llvfs/llvfs.cpp
@@ -267,6 +267,22 @@ LLVFS::LLVFS(const std::string& index_filename, const std::string& data_filename
// Since we're creating this data file, assume any index file is bogus
// remove the index, since this vfs is now blank
LLFile::remove(mIndexFilename);
+
+ // When recreating the cache, also add a marker when we did this (for about/sysinfo)
+ LLFile::remove(mIndexFilename + ".date" );
+ LLFILE *fp = LLFile::fopen( mIndexFilename + ".date", "w" );
+ if( fp )
+ {
+ std::stringstream strm;
+ time_t tmin;
+ time( &tmin );
+ tm *pTm = gmtime( &tmin );
+ strm << std::asctime( pTm ) << " " << std::endl;
+
+ fwrite( strm.str().c_str(), strm.str().size(), 1, fp );
+ LLFile::close( fp );
+ }
+ //
}
else
{
@@ -2203,3 +2219,22 @@ void LLVFS::unlockAndClose(LLFILE *fp)
fclose(fp);
}
}
+
+
+// Query when this cache was created, Returns the time and date in UTC, or unknown,
+std::string LLVFS::getCreationDataUTC() const
+{
+ llifstream date_file;
+ date_file.open(mIndexFilename + ".date");
+ if (date_file.is_open())
+ {
+ std::string date;
+ std::getline(date_file, date);
+ date_file.close();
+
+ if( date.size() )
+ return date;
+ }
+ return "unknown";
+}
+//
diff --git a/indra/llvfs/llvfs.h b/indra/llvfs/llvfs.h
index 63f0f28933..7b19626061 100755
--- a/indra/llvfs/llvfs.h
+++ b/indra/llvfs/llvfs.h
@@ -175,6 +175,11 @@ protected:
S32 mLockCounts[VFSLOCK_COUNT];
BOOL mRemoveAfterCrash;
+
+ // Query when this cache was created, Returns the time and date in UTC, or unknown,
+public:
+ std::string getCreationDataUTC() const;
+ //
};
extern LLVFS *gVFS;
diff --git a/indra/newview/fsdata.cpp b/indra/newview/fsdata.cpp
index 25c07c1a5c..2dbc1c2619 100644
--- a/indra/newview/fsdata.cpp
+++ b/indra/newview/fsdata.cpp
@@ -53,6 +53,7 @@
#include "llviewermedia.h"
#include "llviewernetwork.h"
#include "llxorcipher.h"
+#include "llvfs.h"
const std::string LEGACY_CLIENT_LIST_URL = "http://phoenixviewer.com/app/client_tags/client_list_v2.xml";
const LLUUID MAGIC_ID("3c115e51-04f4-523c-9fa6-98aff1034730");
@@ -979,7 +980,8 @@ LLSD FSData::getSystemInfo()
sysinfo2 += llformat("Bandwidth: %d kbit/s\n", info["BANDWIDTH"].asInteger());
sysinfo2 += llformat("LOD Factor: %.3f\n", info["LOD"].asReal());
sysinfo2 += llformat("Render quality: %s\n", info["RENDERQUALITY_FSDATA_ENGLISH"].asString().c_str()); // FIRE-4785: Current render quality setting in sysinfo / about floater
- sysinfo2 += llformat("Texture memory: %d MB (%.2f)", info["TEXTUREMEMORY"].asInteger(), info["TEXTUREMEMORYMULTIPLIER"].asReal());
+ sysinfo2 += llformat("Texture memory: %d MB (%.2f)\n", info["TEXTUREMEMORY"].asInteger(), info["TEXTUREMEMORYMULTIPLIER"].asReal());
+ sysinfo2 += "VFS (cache) creation time (UTC) " + info["VFS_DATE"].asString();
LLSD sysinfos;
sysinfos["Part1"] = sysinfo1;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 6af7bc7cbc..1d0a78d188 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3986,6 +3986,13 @@ LLSD LLAppViewer::getViewerInfo() const
info["TEXTUREMEMORYMULTIPLIER"] = gSavedSettings.getF32("RenderTextureMemoryMultiple");
//
+ // Add creation time of VFS (cache)
+ if( gVFS )
+ info["VFS_DATE"] = gVFS->getCreationDataUTC();
+ else
+ info["VFS_DATE"] = "unknown";
+ //
+
return info;
}
@@ -4059,6 +4066,12 @@ std::string LLAppViewer::getViewerInfoString() const
{
support << '\n' << LLTrans::getString("AboutTraffic", args);
}
+
+ // Add when the cache was created,
+ if( info.has("VFS_DATE") )
+ support << "\nVFS (cache) creation time (UTC) " << info["VFS_DATE"];
+ //
+
return support.str();
}