def DateTime.to_instant
import bend-kit-time@0.3.0.0/time.bend as Timeimport Base
import bend-kit-int@0.2.0.0/int.bend as Int
273# The instant of a UTC date and time. It does not check t; see DateTime.valid.
274def DateTime.to_instant(t: DateTime) -> Instant:
275 match t:
276 case DateTime{d, h, mi, s, n}:
277 Instant{Int.I64.add(Int.I64.mul(Date.to_days(d), i64(86400)),
278 i64((h * 3600 + mi * 60 + s : U32))), n}