summaryrefslogtreecommitdiff
path: root/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-19 15:34:59 +0400
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-22 14:32:17 +0200
commit5b87292cbc4f3b94ed6426c526c4f3dcca3eaa55 (patch)
treeae74d2e9cd90d503ae179e83616e278d19374b39 /src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp
parentdd8b0a0df9b12aae4c55e6bd548b5af5175dc818 (diff)
downloadqtscript-5b87292cbc4f3b94ed6426c526c4f3dcca3eaa55.tar.gz
Fix DateTime with recent versions of tzdata
An backport of http://trac.webkit.org/changeset/150833 needed for correct time KRAT, YAKT and MOS timezones. Change-Id: I3b5369d1427757c0d638865324a36e43dcaa60bf Task-number: QTBUG-41422 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp
index e9a5c29..532eedb 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp
@@ -129,10 +129,8 @@ ConstructType DateConstructor::getConstructData(ConstructData& constructData)
// ECMA 15.9.2
static JSValue JSC_HOST_CALL callDate(ExecState* exec, JSObject*, JSValue, const ArgList&)
{
- time_t localTime = time(0);
- tm localTM;
- getLocalTime(&localTime, &localTM);
- GregorianDateTime ts(exec, localTM);
+ GregorianDateTime ts;
+ msToGregorianDateTime(exec, currentTimeMS(), false, ts);
DateConversionBuffer date;
DateConversionBuffer time;
formatDate(ts, date);