from datetime import datetime


def timestamp_to_datetime(timestamp):
    """Generate datetime string formatted for the ontology timeseries

    Args:
        timestamp (float, timemstamp): Timestamp value as float

    Returns:
        str: Returns the timestamp with the format necessary to insert in the Ontology
    """
    return datetime.fromtimestamp(timestamp).strftime("%Y-%m-%dT%H:%M:%SZ")