File Manager

Current Path : /usr/lib/python3/dist-packages/landscape/lib/
Upload File :
Current File : //usr/lib/python3/dist-packages/landscape/lib/timestamp.py

from datetime import datetime


def to_timestamp(date, epoch=datetime.utcfromtimestamp(0)):
    """Convert a C{datetime} to an C{int}-based timetamp."""
    delta = date - epoch
    return (delta.days * 60 * 60 * 24) + delta.seconds

File Manager Version 1.0, Coded By Lucas
Email: hehe@yahoo.com