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

Unified Diff: Source/core/html/forms/BaseDateAndTimeInputType.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/dom/Document.cpp ('k') | Source/core/html/forms/MonthInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/BaseDateAndTimeInputType.cpp
diff --git a/Source/core/html/forms/BaseDateAndTimeInputType.cpp b/Source/core/html/forms/BaseDateAndTimeInputType.cpp
index 309d013f5feb1770f9ae170948a45a7d7920976b..c7938864977930efbb4c334fa16db3f627601db8 100644
--- a/Source/core/html/forms/BaseDateAndTimeInputType.cpp
+++ b/Source/core/html/forms/BaseDateAndTimeInputType.cpp
@@ -90,11 +90,7 @@ String BaseDateAndTimeInputType::rangeUnderflowText(const Decimal& minimum) cons
Decimal BaseDateAndTimeInputType::defaultValueForStepUp() const
{
- double ms = currentTimeMS();
- double utcOffset = calculateUTCOffset();
- double dstOffset = calculateDSTOffset(ms, utcOffset);
- int offset = static_cast<int>((utcOffset + dstOffset) / msPerMinute);
- return Decimal::fromDouble(ms + (offset * msPerMinute));
+ return Decimal::fromDouble(convertToLocalTime(currentTimeMS()));
}
bool BaseDateAndTimeInputType::isSteppable() const
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/forms/MonthInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698