subscriber: Remove trailing space from ChronoLocal time formatter. (#1103)

I reckon this is a bug, and @samschlegel fixed this for ChronoUtc,
but not for ChronoLocal.
This commit is contained in:
Naja Melan 2020-11-17 22:44:24 +00:00 committed by Eliza Weisman
parent 88611cbc98
commit 6f9b537c2e

View File

@ -241,8 +241,8 @@ impl FormatTime for ChronoLocal {
fn format_time(&self, w: &mut dyn fmt::Write) -> fmt::Result {
let time = chrono::Local::now();
match self.format {
ChronoFmtType::Rfc3339 => write!(w, "{} ", time.to_rfc3339()),
ChronoFmtType::Custom(ref format_str) => write!(w, "{} ", time.format(format_str)),
ChronoFmtType::Rfc3339 => write!(w, "{}", time.to_rfc3339()),
ChronoFmtType::Custom(ref format_str) => write!(w, "{}", time.format(format_str)),
}
}
}