Skip to main content

date_time_from_fields

Function date_time_from_fields 

Source
pub fn date_time_from_fields(
    f: CalendarDateTime,
    zone: &TzId,
) -> Option<(i64, i32)>
Expand description

Same as local_date_time_from_fields, but the wall-clock reading is in the given zone – for a fixed Offset, subtracts it to get the UTC instant DateTime actually stores (see its doc comment); for a Named zone, resolves the real, DST-aware offset for this specific local date-time via chrono-tz (the same zone can mean a different offset on a different date, which is why this needs the full calendar context resolve_offset alone doesn’t have).