Index: chrome/installer/util/install_util.cc |
=================================================================== |
--- chrome/installer/util/install_util.cc (revision 75311) |
+++ chrome/installer/util/install_util.cc (working copy) |
@@ -240,3 +240,17 @@ |
return status; |
} |
} |
+ |
+std::wstring InstallUtil::GetCurrentDate() { |
+ static const wchar_t kDateFormat[] = L"yyyyMMdd"; |
+ wchar_t date_str[arraysize(kDateFormat)] = {0}; |
+ int len = GetDateFormatW(LOCALE_INVARIANT, 0, NULL, kDateFormat, |
+ date_str, arraysize(date_str)); |
+ if (len) { |
+ --len; // Subtract terminating \0. |
+ } else { |
+ PLOG(DFATAL) << "GetDateFormat"; |
+ } |
+ |
+ return std::wstring(date_str, len); |
+} |