Skip to main content

time_to_micros

Function time_to_micros 

Source
pub unsafe fn time_to_micros(time: Time) -> i64
Expand description

Composes a wall-clock time into a TIME (microseconds since midnight).

Like DuckDB, this does not range-check the fields: it computes ((hour * 60 + min) * 60 + sec) * 1_000_000 + micros, so an out-of-range field gives an out-of-range TIME rather than an error. It cannot throw.

ยงSafety

See date_from_days.