from datetime import datetime


def timestamp_datetime(timestamp):
    """
    Converts a timestamp from the device to a python datetime value
    """
    return datetime.fromtimestamp(timestamp / 1000000000.0)