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

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: Rebase and take review comments into consideration 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
« no previous file with comments | « Source/core/html/forms/BaseDateAndTimeInputType.cpp ('k') | Source/core/html/forms/TimeInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..11b9f1169b662aceefc9da70e66d82604867e381 100644
--- a/Source/core/html/forms/MonthInputType.cpp
+++ b/Source/core/html/forms/MonthInputType.cpp
@@ -86,14 +86,8 @@ 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;
-
DateComponents date;
- date.setMillisecondsSinceEpochForMonth(current);
+ date.setMillisecondsSinceEpochForMonth(convertToLocalTime(currentTimeMS()));
double months = date.monthsSinceEpoch();
ASSERT(std::isfinite(months));
return Decimal::fromDouble(months);
« no previous file with comments | « Source/core/html/forms/BaseDateAndTimeInputType.cpp ('k') | Source/core/html/forms/TimeInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698