encodeXmlDateTimeValue function
Implementation
XmlElement encodeXmlDateTimeValue(String name, DateTime value,
{String Function(DateTime)? formatter}) {
value = value.toUtc();
formatter ??= iso8601ToJson;
final output = formatter(value);
return encodeXmlStringValue(name, output);
}