Getting Started with DTT Lib

1. Installation

Add dtt to your Cargo.toml:

[dependencies]
dtt = "0.0.1"

2. Basic Usage

use dtt::DateTime;

fn main() {
    // Create new DateTime representing current UTC time
    let dt = DateTime::new();

    println!("ISO 8601: {}", dt.iso_8601);
    println!("RFC 3339: {}", dt.to_rfc3339());
    println!("Unix Timestamp: {}", dt.timestamp);
}
Back to the top ↑