time/sys/refresh_tz/mod.rs
1#[cfg_attr(target_family = "unix", path = "unix.rs")]
2mod imp;
3
4/// Update time zone information from the system.
5///
6/// For safety documentation, see [`time::util::refresh_tz`].
7#[inline]
8pub(crate) unsafe fn refresh_tz_unchecked() {
9 // Safety: The caller must uphold the safety requirements.
10 unsafe { imp::refresh_tz_unchecked() }
11}
12
13/// Attempt to update time zone information from the system.
14///
15/// Returns `None` if the call is not known to be sound.
16#[inline]
17pub(crate) fn refresh_tz() -> Option<()> {
18 imp::refresh_tz()
19}