proxmox/src/tools/time.rs: fix previous commit

This commit is contained in:
Dietmar Maurer 2020-09-12 15:07:12 +02:00
parent 5eb5b21044
commit fb4e426a0a

View File

@ -1,4 +1,5 @@
use anyhow::{bail, Error};
use std::ffi::{CStr, CString};
/// Safe bindings to libc timelocal
///
@ -118,6 +119,6 @@ pub fn strftime(format: &str, t: &libc::tm) -> Result<String, Error> {
/// Convert Unix epoch into RFC3339 UTC string
pub fn epoch_to_rfc_3339_utc(epoch: i64) -> Result<String, Error> {
let gmtime = proxmox::tools::time::gmtime(epoch)?;
let gmtime = gmtime(epoch)?;
strftime("%FT%TZ", &gmtime)
}