def jlocaltime(timestamp): """Make :class:`.types.struct_jtm` from `timestamp` according to local zone and dst settings. """ res = struct_jtm() _jlocaltime_r(byref(time_t(timestamp)), byref(res)) return res
def jctime(timestamp, retain_nl=False): """Return string representation of time from timestamp. :param int timestamp: :param bool retain_nl: keep trailing newline character """ res = create_string_buffer(26) _jctime_r(byref(time_t(timestamp)), res) return res.value if retain_nl else res.value[:-1]
def jgmtime(timestamp): """Return :class:`.types.struct_jtm` from `timestamp` expressed in UTC. """ res = struct_jtm() _jgmtime_r(byref(time_t(timestamp)), byref(res)) return res