OXYGENHUB
◆ v0.4.5 oxygen / vendor / iana-time-zone / src / tz_freebsd.rs
348 B · Rust · last changed Strata: the cloud stores send through ureq, so every release target links 1 month ago source blame history raw
1
pub(crate) fn get_timezone_inner() -> Result<String, crate::GetTimezoneError> {
2
    // see https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/19
3
    let mut contents = std::fs::read_to_string("/var/db/zoneinfo")?;
4
    // Trim to the correct length without allocating.
5
    contents.truncate(contents.trim_end().len());
6
    Ok(contents)
7
}