Skip to main content

localtime

Function localtime 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn localtime(timer: *const time_t) -> *mut tm
Expand description

See https://pubs.opengroup.org/onlinepubs/9799919799/functions/localtime.html.

ยงSafety

The caller is required to ensure that:

  • timer is a valid pointer
  • the function has exclusive access to the static tm structure it returns. This implies avoiding simultaneous calls to this function as well as to gmtime()
  • the variables daylight, timezone and tzname are not accessed by user code for the duration of the call.