Beispiel #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
Beispiel #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
Beispiel #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]
Beispiel #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]
Beispiel #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
Beispiel #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