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

Unified Diff: Source/core/html/forms/MonthInputType.cpp

Issue 394903004: document.lastModified should consider user's local time zone (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix windows build error Created 6 years, 5 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
Index: Source/core/html/forms/MonthInputType.cpp
diff --git a/Source/core/html/forms/MonthInputType.cpp b/Source/core/html/forms/MonthInputType.cpp
index 0cdc7da8837b547442c906340722c0cb1a0dd028..6a15af4671f1a45ef409f66c2a089258afe09c62 100644
--- a/Source/core/html/forms/MonthInputType.cpp
+++ b/Source/core/html/forms/MonthInputType.cpp
@@ -86,12 +86,7 @@ String MonthInputType::serializeWithMilliseconds(double value) const
Decimal MonthInputType::defaultValueForStepUp() const
{
- double current = currentTimeMS();
- double utcOffset = calculateUTCOffset();
- double dstOffset = calculateDSTOffset(current, utcOffset);
- int offset = static_cast<int>((utcOffset + dstOffset) / msPerMinute);
- current += offset * msPerMinute;
-
+ double current = convertToLocalTime(currentTimeMS());
DateComponents date;
date.setMillisecondsSinceEpochForMonth(current);
tkent 2014/07/28 00:40:26 nit: date.setMillisecondsSinceEpochForMonth(conver
kangil_ 2014/07/31 00:45:45 Done.
double months = date.monthsSinceEpoch();

Powered by Google App Engine
This is Rietveld 408576698