From 65eebdaaaa561d19950b0b2c794221dbd6b09510 Mon Sep 17 00:00:00 2001 From: Yuchen Wu Date: Tue, 16 Jun 2020 13:08:52 -0700 Subject: [PATCH] Fix comment: correct the comment of RFC2822 format d.day() is u32 so the padding here is '0'(%d) not ' '(%e). --- src/format/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/format/mod.rs b/src/format/mod.rs index aa801683..3603bc1d 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -576,7 +576,7 @@ fn format_inner<'a>( off.map(|&(_, off)| write_local_minus_utc(result, off, true, false)), &Internal(InternalFixed { val: InternalInternal::TimezoneOffsetPermissive }) => panic!("Do not try to write %#z it is undefined"), - &RFC2822 => // same as `%a, %e %b %Y %H:%M:%S %z` + &RFC2822 => // same as `%a, %d %b %Y %H:%M:%S %z` if let (Some(d), Some(t), Some(&(_, off))) = (date, time, off) { let sec = t.second() + t.nanosecond() / 1_000_000_000; write!(