Build Status Latest Version License Docs.rs LOC Dependency Status

libc-strftime

A wrapper library for the glibc strftime function.

Why?

There is currently no way in Rust to get translated date and time.

Examples

Format the current date and time in Brussels in French:

```rust use std::env;

env::setvar("LCALL", "frBE.UTF-8"); env::setvar("TZ", "Europe/Brussels");

libcstrftime::tzset(); libcstrftime::set_locale();

let now = libcstrftime::epoch(); // most likely a u64 let local = libcstrftime::strftime_local("%c", now); println!("On est: {}", local); // On est: mer 07 aoĆ» 2019 06:19:56 CEST ```

Known Issues