Fix system call related date builtin functions

Related issues: #213, #691
 * Fixed 'ecma_date_local_tza' and 'ecma_date_daylight_saving_ta' date builtin helper functions
 * Added syscall of gettimeofday function to get the current system time and timezone.
 * Fixed related regression test files.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2016-02-11 12:03:11 +00:00
parent a7715a5d78
commit 684ed7268c
11 changed files with 163 additions and 56 deletions
+3 -6
View File
@@ -1,5 +1,5 @@
// Copyright 2015 Samsung Electronics Co., Ltd.
// Copyright 2015 University of Szeged.
// Copyright 2015-2016 Samsung Electronics Co., Ltd.
// Copyright 2015-2016 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@ d = new Date(1420070400000);
assert (d.valueOf() == 1420070400000);
d = new Date(2015,0,1,0,0,0,0);
assert (d.valueOf() == 1420070400000);
assert (d.valueOf() - (d.getTimezoneOffset() * 60000) == 1420070400000);
d = new Date(8.64e+15);
assert (d.valueOf() == 8.64e+15);
@@ -80,6 +80,3 @@ catch (e)
assert (typeof Date (2015) == "string");
assert (typeof Date() != typeof (new Date ()));
assert (Date (Number.NaN) == Date ());
// Fixme: remove this case when Date() gives the current time.
assert (Date (2015,1,2) == "Thu Jan 01 1970 00:00:00 GMT+0000");