From ceefaa8095caab83a1d0f48b35d515092d8718ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 15 Sep 2020 12:20:51 +0200 Subject: [PATCH] time: allow leap seconds when parsing RFC3339 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit we don't ever produce those, but they are valid RFC3339 strings Signed-off-by: Fabian Grünbichler --- proxmox/src/tools/time.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxmox/src/tools/time.rs b/proxmox/src/tools/time.rs index 78d75b91..f7faade0 100644 --- a/proxmox/src/tools/time.rs +++ b/proxmox/src/tools/time.rs @@ -257,7 +257,7 @@ pub fn parse_rfc3339(i: &str) -> Result { expect(13, b':')?; tm.set_min(check_max(digit(14)?*10 + digit(15)?, 59)?)?; expect(16, b':')?; - tm.set_sec(check_max(digit(17)?*10 + digit(18)?, 59)?)?; + tm.set_sec(check_max(digit(17)?*10 + digit(18)?, 60)?)?; let epoch = tm.into_epoch()?; if tz == b'Z' {