INNER CODE UNIT · Rust

format_time

rustic-rs/rustic · src/config.rs:293

    pub fn format_time(&self, time: &Zoned) -> impl Display {
        if self.show_time_offset {
            time.strftime("%Y-%m-%d %H:%M:%S%z")
        } else {
            let tz = TimeZone::system();
            if time.offset() == tz.to_offset(time.timestamp()) {
                time.strftime("%Y-%m-%d %H:%M:%S")
            } else {
                time.with_time_zone(tz).strftime("%Y-%m-%d %H:%M:%S*")
            }
        }
    }
}

/// Get the paths to the config file
///
/// # Arguments
///

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…