Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
String(new Date(Mar 30 2014 01:00:00)) is wrong in CET
https://bugs.webkit.org/show_bug.cgi?id=130967 Patch by Byungseon Shin <sun.shin@lge.com> on 2014-10-22 Reviewed by Mark Lam. Source/JavaScriptCore: By definition of calculateLocalTimeOffset, input time should be UTC time. But there are many cases when input time is based on local time. So, it gives erroneous results while calculating offset of DST boundary time. By adding a argument to distinguish UTC and local time, we can get the correct offset. * JavaScriptCore.order: * runtime/DateConstructor.cpp: (JSC::constructDate): (JSC::callDate): (JSC::dateUTC): * runtime/DateInstance.cpp: (JSC::DateInstance::calculateGregorianDateTime): (JSC::DateInstance::calculateGregorianDateTimeUTC): * runtime/DatePrototype.cpp: (JSC::setNewValueFromTimeArgs): (JSC::setNewValueFromDateArgs): (JSC::dateProtoFuncSetMilliSeconds): (JSC::dateProtoFuncSetUTCMilliseconds): (JSC::dateProtoFuncSetSeconds): (JSC::dateProtoFuncSetUTCSeconds): (JSC::dateProtoFuncSetMinutes): (JSC::dateProtoFuncSetUTCMinutes): (JSC::dateProtoFuncSetHours): (JSC::dateProtoFuncSetUTCHours): (JSC::dateProtoFuncSetDate): (JSC::dateProtoFuncSetUTCDate): (JSC::dateProtoFuncSetMonth): (JSC::dateProtoFuncSetUTCMonth): (JSC::dateProtoFuncSetFullYear): (JSC::dateProtoFuncSetUTCFullYear): (JSC::dateProtoFuncSetYear): * runtime/JSDateMath.cpp: (JSC::localTimeOffset): (JSC::gregorianDateTimeToMS): (JSC::msToGregorianDateTime): (JSC::parseDateFromNullTerminatedCharacters): * runtime/JSDateMath.h: * runtime/VM.h: (JSC::LocalTimeOffsetCache::LocalTimeOffsetCache): (JSC::LocalTimeOffsetCache::reset): Passing TimeType argument to distingush UTC time and local time. Source/WTF: By definition of calculateLocalTimeOffset, input time should be UTC time. But there are many cases when input time is based on local time. So, it gives erroneous results while calculating offset of DST boundary time. By adding a argument to distinguish UTC and local time, we can get the correct offset. * wtf/DateMath.cpp: (WTF::calculateLocalTimeOffset): (WTF::parseDateFromNullTerminatedCharacters): Compensate time offset depends on UTC time or local time. * wtf/DateMath.h: Add argument to differenciate UTC or local time. LayoutTests: Set latest DST timezone boundary values on <http://www.timeanddate.com/time/zone/usa/los-angeles> * js/dom/script-tests/date-DST-time-cusps.js: Canonical link: https://commits.webkit.org/155847@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
253a59f
commit 1fc68a1b45d38340c62179385cee82a635d708f7
Showing
13 changed files
with
171 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.