fwd/vendor/android_system_properties/examples/time_zone.rs
John Doty 9c435dc440 Vendor dependencies
Let's see how I like this workflow.
2022-12-19 08:38:22 -08:00

9 lines
340 B
Rust

/// Prints the current time zone, e.g. "Europe/Paris".
use android_system_properties::AndroidSystemProperties;
fn main() {
let android_system_properties = AndroidSystemProperties::new();
let tz = android_system_properties.get("persist.sys.timezone");
println!("Your time zone is: {}", tz.as_deref().unwrap_or("<unknown>"));
}