diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp index f0f0c93b9d3ac0cef3ca4cecc6250c530a2f2422..76b0bea74bda39ab90d74bf500645a200bd3d82b 100644 --- a/src/core/download_manager_delegate_qt.cpp +++ b/src/core/download_manager_delegate_qt.cpp @@ -175,8 +175,15 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem* int uniquifier = base::GetUniquePathNumber(tmpFilePath, base::FilePath::StringType()); if (uniquifier > 0) suggestedFilePath = toQt(tmpFilePath.InsertBeforeExtensionASCII(base::StringPrintf(" (%d)", uniquifier)).AsUTF8Unsafe()); - else if (uniquifier == -1) - suggestedFilePath = toQt(tmpFilePath.InsertBeforeExtensionASCII(base::StringPrintf(" - %s", base::TimeToISO8601(item->GetStartTime()).c_str())).AsUTF8Unsafe()); + else if (uniquifier == -1) { + base::Time::Exploded exploded; + item->GetStartTime().LocalExplode(&exploded); + std::string suffix = base::StringPrintf( + " - %04d-%02d-%02dT%02d%02d%02d.%03d", exploded.year, exploded.month, + exploded.day_of_month, exploded.hour, exploded.minute, + exploded.second, exploded.millisecond); + suggestedFilePath = toQt(tmpFilePath.InsertBeforeExtensionASCII(suffix).AsUTF8Unsafe()); + } item->AddObserver(this); QList<ProfileAdapterClient*> clients = m_profileAdapter->clients();