parsers: update for minidom API changes

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2020-03-28 13:07:26 +01:00
commit 6308250c17
26 changed files with 140 additions and 190 deletions

View file

@ -75,11 +75,10 @@ impl TryFrom<Element> for TimeResult {
impl From<TimeResult> for Element {
fn from(time: TimeResult) -> Element {
Element::builder("time")
.ns(ns::TIME)
.append(Element::builder("tzo").append(format!("{}", time.0.timezone())))
Element::builder("time", ns::TIME)
.append(Element::builder("tzo", ns::TIME).append(format!("{}", time.0.timezone())))
.append(
Element::builder("utc")
Element::builder("utc", ns::TIME)
.append(time.0.with_timezone(FixedOffset::east(0)).format("%FT%TZ")),
)
.build()