diff --git a/Cargo.toml b/Cargo.toml index cba2e87..f97809a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sitewriter" -version = "0.5.4" +version = "0.5.5" authors = ["Edgar "] edition = "2021" description = "A sitemap writing library." @@ -12,9 +12,9 @@ keywords = ["sitemap", "sitemapindex", "xml", "parser"] categories = ["parsing"] [dependencies] -chrono = "0.4.22" -derive_builder = "0.11.2" -quick-xml = "0.26.0" +chrono = "0.4.23" +derive_builder = "0.12.0" +quick-xml = "0.27.1" url = "2.3.1" [dev-dependencies] diff --git a/examples/gen_sitemap.rs b/examples/gen_sitemap.rs index 2729546..7c8747c 100644 --- a/examples/gen_sitemap.rs +++ b/examples/gen_sitemap.rs @@ -23,7 +23,7 @@ fn main() { loc: "https://edgarluque.com/blog/sitewriter".parse().unwrap(), changefreq: Some(ChangeFreq::Never), priority: Some(0.5), - lastmod: Some(Utc.ymd(2020, 11, 22).and_hms(15, 10, 15)), + lastmod: Some(Utc.with_ymd_and_hms(2020, 12, 5, 15, 30, 0).unwrap()), }, UrlEntry { loc: "https://edgarluque.com/blog/some-future-post" @@ -31,9 +31,7 @@ fn main() { .unwrap(), changefreq: Some(ChangeFreq::Never), priority: Some(0.5), - lastmod: Some( - Utc.from_utc_datetime(&Local.ymd(2020, 12, 5).and_hms(12, 30, 0).naive_utc()), - ), + lastmod: Some(Utc.with_ymd_and_hms(2020, 12, 5, 12, 30, 0).unwrap()), }, // Entity escaping UrlEntry { @@ -42,9 +40,7 @@ fn main() { .unwrap(), changefreq: Some(ChangeFreq::Never), priority: Some(0.5), - lastmod: Some( - Utc.from_utc_datetime(&Local.ymd(2020, 12, 5).and_hms(12, 30, 0).naive_utc()), - ), + lastmod: Some(Utc.with_ymd_and_hms(2020, 12, 5, 12, 30, 0).unwrap()), }, ];