from datetime import datetime


def utctime_str(timestamp: float, fmt: str) -> str:
    """
    Convert a UTC timestamp to a string representation based on the given format.

    The result has any ':' characters converted to '-' to remain filesystem-friendly.

    Arguments:
        timestamp:  UTC timestamp to convert, in seconds.

    Returns:
        String version of the provided timestamp.
    """

    return datetime.utcfromtimestamp(timestamp).strftime(fmt).replace(':', '-')