code: def make_aware(value, timezone):
      
      if hasattr(timezone, 'localize') and value not in (datetime.datetime.min, datetime.datetime.max):
          # available for pytz time zones
          return timezone.localize(value, is_dst=None)
      else:
          # may be wrong around DST changes
          return value.replace(tzinfo=timezone)
docs: Makes a naive datetime.datetime in a given time zone aware.