majiidd / persiantools

Jalali date and datetime with other tools
MIT License
166 stars 20 forks source link

to_jalali tzname error #35

Open mahdizojaji opened 1 year ago

mahdizojaji commented 1 year ago

Hey.

Code:

from django.utils import timezone
JalaliDateTime.to_jalali(self.created_at, tzinfo=timezone.tzinfo).strftime('%d %B %Y - %H:%M', locale='fa')

Execption:

tzname(dt) argument must be a datetime instance or None, not JalaliDateTime