From 1671f5c918376affa5f095f4363125df03b62ec0 Mon Sep 17 00:00:00 2001 From: Cinders Date: Sat, 28 Sep 2013 07:22:24 -0600 Subject: [PATCH] Fix timestamps in exporters --- indra/newview/daeexport.cpp | 2 +- indra/newview/fsfloaterexport.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/daeexport.cpp b/indra/newview/daeexport.cpp index dbcb35a77a..de39020c69 100644 --- a/indra/newview/daeexport.cpp +++ b/indra/newview/daeexport.cpp @@ -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"); diff --git a/indra/newview/fsfloaterexport.cpp b/indra/newview/fsfloaterexport.cpp index a09d44e5d6..66a5af57cb 100644 --- a/indra/newview/fsfloaterexport.cpp +++ b/indra/newview/fsfloaterexport.cpp @@ -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;