[Fixed]-How to check a given string is a timezone instance

1👍

You can use is_aware or is_naive

from django.utils.timezone import is_aware
if not is_aware(date):
    raise ValidationError('please provide timezone aware date type value')

Leave a comment