aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/ecmascripttests
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2016-10-28 17:24:46 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2017-11-14 17:18:15 +0000
commit2b8b7a162be52f8cd6c2bc39f498a1ddfb59dd68 (patch)
tree31b34d5ea5e7e13a75379ad80e54a2b962403fca /tests/auto/qml/ecmascripttests
parentef2f92d779a719d5b734dc09ae59ba947ac557aa (diff)
V4 Date: fix what we can within ECMA 262's limitations
Use QDateTime and QTimeZone to simplify code (when we can). Note which defective methods are so because the ECMAScript spec requires those defects, reference my bug report against those defects. Fix currentTime to return a UTC time. Fix getLocalTZA to actually deliver the standard offset, without daylight-saving corrections. Fix DaylightSavingTA(t) to return the difference between current standard time offset and pertinent total offset at time t (explaining why that's the least broken answer), rather than assuming DST is one hour when active. (In some places it's half an hour, in some places two hours; and the bugs in the spec break UTC() and LocalTime() if we only return actual DST offset, without adjusting for historical changes to standard offset.) Fix tests to use actual IANA IDs for zones. Change QTime-to-Time conversion to use a modernish date, for which time-zone data is likely to at least be consistently handled, instead of MakeDay(0, 0, 0); that's (nominal proleptic Gregorian) 2 BC, December 31st (represented denormally) for which any time-zone data we have is artificial and contrived. I chose Cassini's third centennary, as it's not likely to be near any zone transitions and is within the era of sane time-zone data. Task-number: QTBUG-56787 Change-Id: I5f21ee2010070a5c1798134fdd2915a723208fd9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/qml/ecmascripttests')
-rwxr-xr-xtests/auto/qml/ecmascripttests/test262.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qml/ecmascripttests/test262.py b/tests/auto/qml/ecmascripttests/test262.py
index 437cd1b27d..ae4c54df9d 100755
--- a/tests/auto/qml/ecmascripttests/test262.py
+++ b/tests/auto/qml/ecmascripttests/test262.py
@@ -552,10 +552,10 @@ class TestSuite(object):
def Main():
- # Some date tests rely on being run in pacific time.
# Uncomment the next line for more logging info.
#logging.basicConfig(level=logging.DEBUG)
- os.environ["TZ"] = "PST8PDT"
+ # Some date tests rely on being run in pacific time and the USA's locale:
+ os.environ["TZ"] = "America/Vancouver"
os.environ["LANG"] = "en_US.UTF-8"
os.environ["LC_TIME"] = "en_US.UTF-8"
parser = BuildOptions()