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:
@@ -492,19 +492,16 @@ jerry_port_log (jerry_log_level_t level, /**< log level */
|
||||
} /* jerry_port_log */
|
||||
|
||||
/**
|
||||
* Dummy function to get the time zone.
|
||||
* Dummy function to get the time zone adjustment.
|
||||
*
|
||||
* @return true
|
||||
* @return 0
|
||||
*/
|
||||
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)
|
||||
{
|
||||
/* We live in UTC. */
|
||||
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 */
|
||||
|
||||
/**
|
||||
* Dummy function to get the current time.
|
||||
|
||||
Reference in New Issue
Block a user