from datetime import datetime


def get_timestamp(context, timezone) -> datetime:
    """Get current timestamp from the context and convert to given timezone."""
    assert context.timestamp.endswith("Z"), "Timestamp has to be in UTC"
    timestamp = datetime.fromisoformat(context.timestamp.replace("Z", ""))
    timestamp = timezone.fromutc(timestamp)
    return timestamp