Skip to content

Commit

Permalink
Add '0' to RFC2822
Browse files Browse the repository at this point in the history
  • Loading branch information
wyhaya authored and quodlibetor committed Jun 25, 2019
1 parent d8c68f6 commit ef63c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/format/mod.rs
Expand Up @@ -511,7 +511,7 @@ pub fn format<'a, I>(w: &mut fmt::Formatter, date: Option<&NaiveDate>, time: Opt
RFC2822 => // same to `%a, %e %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;
try!(write!(w, "{}, {:2} {} {:04} {:02}:{:02}:{:02} ",
try!(write!(w, "{}, {:02} {} {:04} {:02}:{:02}:{:02} ",
SHORT_WEEKDAYS[d.weekday().num_days_from_monday() as usize],
d.day(), SHORT_MONTHS[d.month0() as usize], d.year(),
t.hour(), t.minute(), sec));
Expand Down

0 comments on commit ef63c2d

Please sign in to comment.