Support local time output for the Date object.

Convert the primitive time to local time if it is required.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
This commit is contained in:
Roland Takacs
2015-07-23 14:50:41 +02:00
parent 156510e174
commit 3151a460fc
2 changed files with 16 additions and 8 deletions
+4
View File
@@ -111,3 +111,7 @@ assert (typeof Date() != typeof (new Date ()));
assert (Date () == (new Date ()).toString ());
assert (Date (2015, 1, 1) == (new Date ()).toString ());
assert (Date (Number.NaN) == Date ());
// Fixme: remove these cases when TZA and DST are supported.
assert (new Date ("2015-07-08T11:29:05.023-02:00").toString() == "2015-07-08T13:29:05.023");
assert (new Date ("2015-07-08T11:29:05.023-02:00").toLocaleString() == "2015-07-08T13:29:05.023");