From 7fd18bb902c4f80d2dffba400574b46cc669d4f2 Mon Sep 17 00:00:00 2001 From: Aleksander Sotov Date: Tue, 30 Apr 2024 11:42:03 +0300 Subject: [PATCH] Use begin of epoch when parse Date from string Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/I9NKBB Test: Date methods tested by eschecked generator Signed-off-by: Aleksander Sotov --- static_core/plugins/ets/stdlib/escompat/Date.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static_core/plugins/ets/stdlib/escompat/Date.ets b/static_core/plugins/ets/stdlib/escompat/Date.ets index 87b2eae232..07f5fb3222 100644 --- a/static_core/plugins/ets/stdlib/escompat/Date.ets +++ b/static_core/plugins/ets/stdlib/escompat/Date.ets @@ -432,7 +432,7 @@ export final class Date { throw new InvalidDate(); } - let date = new Date(); + let date = new Date(0); let timeZone: long = 0; const years = Date.parseIfContains(dateStr, 0, 4); -- Gitee