def get_timezone_utc():
    """
    Returns UTC attribute in a backwards compatible way.

    UTC attribute has been moved from django.utils.timezone module to
    datetime.timezone class
    """
    try:
        # Django 4+
        return datetime.timezone.utc
    except AttributeError:
        return timezone.utc

    Returns UTC attribute in a backwards compatible way.

    UTC attribute has been moved from django.utils.timezone module to
    datetime.timezone class
    
djstripe/utils.py