diff --git a/Cargo.toml b/Cargo.toml index bf7837ba..1bd93da5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,6 +37,8 @@ temp-env = "0.3.3" [workspace] +resolver = "2" + members = [ "fontdrasil", "fontbe", diff --git a/glyphs2fontir/src/source.rs b/glyphs2fontir/src/source.rs index 0d132361..b054ac7f 100644 --- a/glyphs2fontir/src/source.rs +++ b/glyphs2fontir/src/source.rs @@ -1,4 +1,4 @@ -use chrono::{TimeZone, Utc}; +use chrono::DateTime; use font_types::{NameId, Tag}; use fontdrasil::orchestration::{Access, Work}; use fontdrasil::types::{GlyphName, GroupName}; @@ -366,7 +366,8 @@ impl Work for StaticMetadataWork { .date .as_ref() .and_then(|raw_date| { - let parsed = Utc.datetime_from_str(raw_date, "%Y-%m-%d %H:%M:%S %Z"); + let parsed = + DateTime::parse_from_str(raw_date, "%Y-%m-%d %H:%M:%S %z").map(|nd| nd.into()); if let Err(e) = parsed { warn!("Invalid creation date: {}: {e:?}", raw_date); } diff --git a/ufo2fontir/src/source.rs b/ufo2fontir/src/source.rs index a5a5cddf..0349e9de 100644 --- a/ufo2fontir/src/source.rs +++ b/ufo2fontir/src/source.rs @@ -5,7 +5,7 @@ use std::{ sync::Arc, }; -use chrono::{DateTime, TimeZone, Utc}; +use chrono::{DateTime, NaiveDateTime, Utc}; use font_types::{InvalidTag, NameId, Tag}; use fontdrasil::{ orchestration::{Access, Work}, @@ -666,7 +666,8 @@ fn try_parse_date(raw_date: Option<&String>) -> Option> { return None; }; - let parse_result = Utc.datetime_from_str(raw_date, "%Y/%m/%d %H:%M:%S"); + let parse_result = + NaiveDateTime::parse_from_str(raw_date, "%Y/%m/%d %H:%M:%S").map(|nd| nd.and_utc()); if let Err(e) = parse_result { warn!("Invalid date string {}: {e}", raw_date); }