Module ruplicity::time_utils

source ·
Expand description

Utilities to parse and display timestamps.

This sub-module contains a trait that can be used to display a timestamp in local or UTC time zones, and a function to parse a timestamp.

Example

Parse a duplicity timestamp and display it:

use ruplicity::time_utils::{parse_time_str, TimeDisplay};

let time = parse_time_str("19881211t152000z").unwrap();
println!("My birth is {}", time.into_local_display());

Structs

  • Implements Display in a pretty style for some Tm instance.

Traits

  • Trait that allows to display a time into a local or UTC timezone.

Functions

  • Parse a string representing a duplicity timestamp and returns a Timespec if all goes well.