Skip to main content

encode_datetimeoffset

Function encode_datetimeoffset 

Source
pub fn encode_datetimeoffset(
    datetime: DateTime<FixedOffset>,
    buf: &mut BytesMut,
) -> Result<(), TypeError>
Expand description

Encode a DATETIMEOFFSET value.

DATETIMEOFFSET is encoded as TIME + DATE + offset (in minutes). Per MS-TDS ยง2.2.5.5.1.9 the date/time portion is the UTC instant, not the local wall-clock; the offset is carried separately.