MCPcopy Index your code
hub / github.com/RustPython/RustPython / win_mktime

Function win_mktime

crates/vm/src/stdlib/time.rs:1449–1456  ·  view source on GitHub ↗
(t: &StructTimeData, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1447 }
1448
1449 pub(super) fn win_mktime(t: &StructTimeData, vm: &VirtualMachine) -> PyResult<f64> {
1450 let mut tm = super::decl::tm_from_struct_time(t, vm)?;
1451 let timestamp = unsafe { rustpython_common::suppress_iph!(c_mktime(&mut tm)) };
1452 if timestamp == -1 && tm.tm_wday == -1 {
1453 return Err(vm.new_overflow_error("mktime argument out of range"));
1454 }
1455 Ok(timestamp as f64)
1456 }
1457
1458 fn u64_from_filetime(time: FILETIME) -> u64 {
1459 let large: [u32; 2] = [time.dwLowDateTime, time.dwHighDateTime];

Callers 1

mktimeFunction · 0.85

Calls 2

tm_from_struct_timeFunction · 0.85
ErrClass · 0.50

Tested by

no test coverage detected