1 //! A method to obtain the local offset from UTC.
3 #![allow(clippy::missing_const_for_fn)]
5 #[cfg_attr(target_family = "windows", path = "windows.rs")]
6 #[cfg_attr(target_family = "unix", path = "unix.rs")]
9 target_arch
= "wasm32",
10 not(any(target_os
= "emscripten", target_os
= "wasi")),
11 feature
= "wasm-bindgen"
17 use crate::{OffsetDateTime, UtcOffset}
;
19 /// Attempt to obtain the system's UTC offset. If the offset cannot be determined, `None` is
21 pub(crate) fn local_offset_at(datetime
: OffsetDateTime
) -> Option
<UtcOffset
> {
22 imp
::local_offset_at(datetime
)