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

Unified Diff: Source/core/html/shadow/DateTimeFieldElements.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/TimeInputType.cpp ('k') | Source/wtf/DateMath.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/DateTimeFieldElements.cpp
diff --git a/Source/core/html/shadow/DateTimeFieldElements.cpp b/Source/core/html/shadow/DateTimeFieldElements.cpp
index 2a324e2610fa03cac4912b437e533d6cbc736d21..e8047e1cd5e62de5ed221609bceedac9cc4cd0c7 100644
--- a/Source/core/html/shadow/DateTimeFieldElements.cpp
+++ b/Source/core/html/shadow/DateTimeFieldElements.cpp
@@ -589,14 +589,8 @@ PassRefPtrWillBeRawPtr<DateTimeYearFieldElement> DateTimeYearFieldElement::creat
static int currentFullYear()
{
- 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()));
return date.fullYear();
}
« no previous file with comments | « Source/core/html/forms/TimeInputType.cpp ('k') | Source/wtf/DateMath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698