Change jerry_port interface to allow for a correct implementation of timezones. (#2540)

The previous jerry_port interface did not allow timezones to be handled correctly,
even if the host system was up to the task. This PR changes the jerry_port interface
to allow a completely correct implementation to exist, and provides one (for Linux/BSD
systems) in default-date.c.

Fixes #1661

JerryScript-DCO-1.0-Signed-off-by: crazy2be crazy1be@gmail.com
This commit is contained in:
crazy2be
2018-10-17 18:58:18 -04:00
committed by Akos Kiss
parent 9ab33e86d3
commit 3afc4b0b85
16 changed files with 171 additions and 220 deletions
+4 -7
View File
@@ -52,16 +52,13 @@ void jerry_port_fatal (jerry_fatal_code_t code)
} /* jerry_port_fatal */
/**
* Curie BSP implementation of jerry_port_get_time_zone.
* Curie BSP implementation of jerry_port_get_local_time_zone_adjustment.
*/
bool jerry_port_get_time_zone (jerry_time_zone_t *tz_p)
double jerry_port_get_local_time_zone_adjustment (double unix_ms, bool is_utc)
{
//EMPTY implementation
tz_p->offset = 0;
tz_p->daylight_saving_time = 0;
return true;
} /* jerry_port_get_time_zone */
return 0;
} /* jerry_port_get_local_time_zone_adjustment */
/**
* Curie BSP implementation of jerry_port_get_current_time.