Fix timestamps in exporters

Cinders 2013-09-28 07:22:24 -06:00
parent 6c222c6a59
commit 1671f5c918
2 changed files with 5 additions and 5 deletions

View File

@ -658,7 +658,7 @@ bool DAESaver::saveDAE(std::string filename)
time_t rawtime;
time(&rawtime);
struct tm* utc_time = gmtime(&rawtime);
std::string date = llformat("%04d-%02d-%02dT%02d:%02d:%02dz", utc_time->tm_year + 1900, utc_time->tm_mon + 1, utc_time->tm_mday, utc_time->tm_hour, utc_time->tm_min, utc_time->tm_sec);
std::string date = llformat("%04d-%02d-%02dT%02d:%02d:%02d", utc_time->tm_year + 1900, utc_time->tm_mon + 1, utc_time->tm_mday, utc_time->tm_hour, utc_time->tm_min, utc_time->tm_sec);
daeElement* created = asset->add("created");
created->setCharData(date);
daeElement* modified = asset->add("modified");

View File

@ -261,10 +261,10 @@ bool FSFloaterObjectExport::exportSelection()
std::string author = "Unknown";
if (gCacheName)
gCacheName->getFullName(gAgentID, author);
char buff[10];
time_t now = time(NULL);
strftime(buff, 10, "%Y-%m-%d", localtime(&now));
std::string date(buff, 10);
time_t rawtime;
time(&rawtime);
struct tm* utc_time = gmtime(&rawtime);
std::string date = llformat("%04d-%02d-%02d", utc_time->tm_year + 1900, utc_time->tm_mon + 1, utc_time->tm_mday);
mManifest["format_version"] = OXP_FORMAT_VERSION;
mManifest["client"] = LLVersionInfo::getChannelAndVersion();
mManifest["creation_date"] = date;