/usr/share/pyshared/landscape/lib/timestamp.py is in landscape-common 12.04.3-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 | 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
|