Sha256: 9eda7e9a4cc830f09c06cdaf70026cc95ca55248260a335e1fced68f381bbdfc

Contents?: true

Size: 552 Bytes

Versions: 19

Compression:

Stored size: 552 Bytes

Contents

#[path = "Windows.rs"]
#[allow(missing_debug_implementations, clippy::undocumented_unsafe_blocks)]
mod windows;

use windows::Globalization::Calendar;

impl From<windows_core::Error> for crate::GetTimezoneError {
    fn from(orig: windows_core::Error) -> Self {
        crate::GetTimezoneError::IoError(std::io::Error::new(std::io::ErrorKind::Other, orig))
    }
}

pub(crate) fn get_timezone_inner() -> Result<String, crate::GetTimezoneError> {
    let cal = Calendar::new()?;
    let tz_hstring = cal.GetTimeZone()?;
    Ok(tz_hstring.to_string())
}

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.61/src/tz_windows.rs
wasmtime-28.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.61/src/tz_windows.rs
wasmtime-27.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.61/src/tz_windows.rs
wasmtime-26.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.61/src/tz_windows.rs
wasmtime-25.0.2 ./ext/cargo-vendor/iana-time-zone-0.1.60/src/tz_windows.rs
wasmtime-25.0.1 ./ext/cargo-vendor/iana-time-zone-0.1.60/src/tz_windows.rs
wasmtime-25.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.60/src/tz_windows.rs
wasmtime-24.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.60/src/tz_windows.rs
wasmtime-23.0.2 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs
wasmtime-22.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs
wasmtime-21.0.1 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs
wasmtime-20.0.2 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs
wasmtime-20.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs
wasmtime-18.0.3 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs
wasmtime-17.0.1 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs
wasmtime-17.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs
wasmtime-16.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs
wasmtime-15.0.1 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs
wasmtime-15.0.0 ./ext/cargo-vendor/iana-time-zone-0.1.59/src/tz_windows.rs