Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: content/renderer/date_time_formatter.cc

Issue 17574002: When using the week-of-year syntax, don't construct an intermediate time value when formatting; use… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-enable test Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/date_time_formatter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/date_time_formatter.cc
diff --git a/content/renderer/date_time_formatter.cc b/content/renderer/date_time_formatter.cc
index 3b976b884e2d548a3e821ca456a7584dc148bb30..f9d02edff845015720043182637f51bc992eb03c 100644
--- a/content/renderer/date_time_formatter.cc
+++ b/content/renderer/date_time_formatter.cc
@@ -130,10 +130,9 @@ const std::string DateTimeFormatter::FormatString() const {
calendar.set(UCAL_MINUTE, minute_);
calendar.set(UCAL_SECOND, second_);
}
- UDate time = calendar.getTime(success);
icu::SimpleDateFormat formatter(*pattern_, success);
icu::UnicodeString formatted_time;
- formatter.format(time, formatted_time, success);
+ formatter.format(calendar, formatted_time, NULL, success);
UTF16ToUTF8(formatted_time.getBuffer(),
static_cast<size_t>(formatted_time.length()),
&result);
« no previous file with comments | « no previous file | content/renderer/date_time_formatter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698