@conf.commands.register
def pkt2uptime(pkt, HZ=100):
    if not isinstance(pkt, Packet):
        raise TypeError("Not a TCP packet")
    if isinstance(pkt,NoPayload):
        raise TypeError("Not a TCP packet")
    if not isinstance(pkt, TCP):
        return pkt2uptime(pkt.payload)
    for opt in pkt.options:
        if opt[0] == "Timestamp":
            #t = pkt.time - opt[1][0] * 1.0/HZ
            #return time.ctime(t)
            t = opt[1][0] / HZ
            return t
    raise TypeError("No timestamp option")
Calculate the date the machine which emitted the packet booted using TCP timestamp 
dataset/ETHPy150Open phaethon/scapy/scapy/modules/p0f.py/pkt2uptime