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

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: 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/BaseDateAndTimeInputType.cpp
diff --git a/Source/core/html/forms/BaseDateAndTimeInputType.cpp b/Source/core/html/forms/BaseDateAndTimeInputType.cpp
index 309d013f5feb1770f9ae170948a45a7d7920976b..de2238b92d0e77b9c1ac4e582dc4ec59993ed43d 100644
--- a/Source/core/html/forms/BaseDateAndTimeInputType.cpp
+++ b/Source/core/html/forms/BaseDateAndTimeInputType.cpp
@@ -90,11 +90,8 @@ 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));
+ double current = convertToLocalTime(currentTimeMS());
+ return Decimal::fromDouble(current);
tkent 2014/07/28 00:40:26 nit: return Decimal::fromDouble(convertToLocalTi
kangil_ 2014/07/31 00:45:45 Done.
}
bool BaseDateAndTimeInputType::isSteppable() const

Powered by Google App Engine
This is Rietveld 408576698