diff options
Diffstat (limited to 'src/xml')
| -rw-r--r-- | src/xml/reader.rs | 4 | ||||
| -rw-r--r-- | src/xml/writer.rs | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/xml/reader.rs b/src/xml/reader.rs index c1c2b3b..6642d59 100644 --- a/src/xml/reader.rs +++ b/src/xml/reader.rs @@ -148,7 +148,7 @@ impl<R: Read> Iterator for EventReader<R> { #[cfg(test)] mod tests { - use chrono::{TimeZone, Utc}; + use humantime::parse_rfc3339_weak; use std::fs::File; use std::path::Path; @@ -179,7 +179,7 @@ mod tests { StringValue("Data".to_owned()), DataValue(vec![0, 0, 0, 190, 0, 0, 0, 3, 0, 0, 0, 30, 0, 0, 0]), StringValue("Birthdate".to_owned()), - DateValue(Date::from_chrono(Utc.ymd(1981, 05, 16).and_hms(11, 32, 06))), + DateValue(parse_rfc3339_weak("1981-05-16 11:32:06").unwrap().into()), StringValue("Blank".to_owned()), StringValue("".to_owned()), EndDictionary, diff --git a/src/xml/writer.rs b/src/xml/writer.rs index 77ccd87..67bb6a2 100644 --- a/src/xml/writer.rs +++ b/src/xml/writer.rs @@ -188,10 +188,9 @@ impl<W: Write> PlistEventWriter for EventWriter<W> { #[cfg(test)] mod tests { - use chrono::{TimeZone, Utc}; + use humantime::parse_rfc3339_weak; use std::io::Cursor; - use Date; use super::*; #[test] @@ -214,7 +213,7 @@ mod tests { StringValue("Data".to_owned()), DataValue(vec![0, 0, 0, 190, 0, 0, 0, 3, 0, 0, 0, 30, 0, 0, 0]), StringValue("Birthdate".to_owned()), - DateValue(Date::from_chrono(Utc.ymd(1981, 05, 16).and_hms(11, 32, 06))), + DateValue(parse_rfc3339_weak("1981-05-16 11:32:06").unwrap().into()), EndDictionary, ]; |
