Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
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]
Esempio n. 4
0
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]
Esempio n. 5
0
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
Esempio n. 6
0
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