summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bridge/qt/qt_runtime.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-30 11:37:48 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-30 11:38:52 +0200
commit89e2486a48b739f8d771d69ede5a6a1b244a10fc (patch)
tree503b1a7812cf97d93704c32437eb5f62dc1a1ff9 /Source/WebCore/bridge/qt/qt_runtime.cpp
parent625f028249cb37c55bbbd153f3902afd0b0756d9 (diff)
Imported WebKit commit 0282df8ca7c11d8c8a66ea18543695c69f545a27 (http://svn.webkit.org/repository/webkit/trunk@124002)
New snapshot with prospective Mountain Lion build fix
Diffstat (limited to 'Source/WebCore/bridge/qt/qt_runtime.cpp')
-rw-r--r--Source/WebCore/bridge/qt/qt_runtime.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/WebCore/bridge/qt/qt_runtime.cpp b/Source/WebCore/bridge/qt/qt_runtime.cpp
index f3aab2175..61025ea30 100644
--- a/Source/WebCore/bridge/qt/qt_runtime.cpp
+++ b/Source/WebCore/bridge/qt/qt_runtime.cpp
@@ -504,10 +504,10 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
GregorianDateTime gdt;
msToGregorianDateTime(exec, date->internalNumber(), true, gdt);
if (hint == QMetaType::QDateTime) {
- ret = QDateTime(QDate(gdt.year() + 1900, gdt.month() + 1, gdt.monthDay()), QTime(gdt.hour(), gdt.minute(), gdt.second()), Qt::UTC);
+ ret = QDateTime(QDate(gdt.year(), gdt.month() + 1, gdt.monthDay()), QTime(gdt.hour(), gdt.minute(), gdt.second()), Qt::UTC);
dist = 0;
} else if (hint == QMetaType::QDate) {
- ret = QDate(gdt.year() + 1900, gdt.month() + 1, gdt.monthDay());
+ ret = QDate(gdt.year(), gdt.month() + 1, gdt.monthDay());
dist = 1;
} else {
ret = QTime(gdt.hour(), gdt.minute(), gdt.second());
@@ -518,10 +518,10 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
GregorianDateTime gdt;
msToGregorianDateTime(exec, b, true, gdt);
if (hint == QMetaType::QDateTime) {
- ret = QDateTime(QDate(gdt.year() + 1900, gdt.month() + 1, gdt.monthDay()), QTime(gdt.hour(), gdt.minute(), gdt.second()), Qt::UTC);
+ ret = QDateTime(QDate(gdt.year(), gdt.month() + 1, gdt.monthDay()), QTime(gdt.hour(), gdt.minute(), gdt.second()), Qt::UTC);
dist = 6;
} else if (hint == QMetaType::QDate) {
- ret = QDate(gdt.year() + 1900, gdt.month() + 1, gdt.monthDay());
+ ret = QDate(gdt.year(), gdt.month() + 1, gdt.monthDay());
dist = 8;
} else {
ret = QTime(gdt.hour(), gdt.minute(), gdt.second());
@@ -874,7 +874,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
// Dates specified this way are in local time (we convert DateTimes above)
GregorianDateTime dt;
- dt.setYear(date.year() - 1900);
+ dt.setYear(date.year());
dt.setMonth(date.month() - 1);
dt.setMonthDay(date.day());
dt.setHour(time.hour());