mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 16:20:49 +00:00
Merge pull request #89 from wasmerio/feature/fix-localtime_r-for-macos
Fix _localtime_r
This commit is contained in:
commit
b44893318c
@ -226,8 +226,8 @@ pub extern "C" fn _localtime_r(time_p: u32, result: u32, instance: &mut Instance
|
||||
// https://stackoverflow.com/questions/19170721/real-time-awareness-of-timezone-change-in-localtime-vs-localtime-r
|
||||
|
||||
unsafe {
|
||||
let seconds = instance.memory_offset_addr(0, time_p as _) as *const i64;
|
||||
let timespec = time::Timespec::new(*seconds, 0);
|
||||
let seconds = instance.memory_offset_addr(0, time_p as _) as *const i32;
|
||||
let timespec = time::Timespec::new(*seconds as _, 0);
|
||||
let result_tm = time::at(timespec);
|
||||
|
||||
// debug!(
|
||||
|
Loading…
x
Reference in New Issue
Block a user