I think a better option would be to not fight the parser API and explicitly specify the time zone instead. DateTime<Utc> implements From<DateTime<FixedOffset>>, and naïve dates are almost never what one needs/wants anyway. Playground:
fn main() -> Result<(), ParseError> {
let date = DateTime::parse_from_str(
&*format!("{y}-{m}-01 00:00:00 +0000", y = "2021", m = "12"),
"%Y-%m-%d %H:%M:%S %z",
)?;
let date = DateTime::<Utc>::from(date);
println!("{}", date);
Ok(())
}
I am already using said From impl in the example I provided. I don't see any significant difference between the behavior of my code and the function you wrote.