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

Unified Diff: Source/core/html/forms/TimeInputType.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/MonthInputType.cpp ('k') | Source/core/html/shadow/DateTimeFieldElements.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/TimeInputType.cpp
diff --git a/Source/core/html/forms/TimeInputType.cpp b/Source/core/html/forms/TimeInputType.cpp
index f91bf233176d4331c7c43d1bfc2845e2a8e4b20d..8f7169e9fba17a00c3e85b56becb8facb955081e 100644
--- a/Source/core/html/forms/TimeInputType.cpp
+++ b/Source/core/html/forms/TimeInputType.cpp
@@ -73,14 +73,8 @@ const AtomicString& TimeInputType::formControlType() const
Decimal TimeInputType::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.setMillisecondsSinceMidnight(current);
+ date.setMillisecondsSinceMidnight(convertToLocalTime(currentTimeMS()));
double milliseconds = date.millisecondsSinceEpoch();
ASSERT(std::isfinite(milliseconds));
return Decimal::fromDouble(milliseconds);
« no previous file with comments | « Source/core/html/forms/MonthInputType.cpp ('k') | Source/core/html/shadow/DateTimeFieldElements.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698