Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with with datetime.timezone #11

Open
moosavimaleki opened this issue Oct 23, 2022 · 0 comments
Open

problem with with datetime.timezone #11

moosavimaleki opened this issue Oct 23, 2022 · 0 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@moosavimaleki
Copy link

moosavimaleki commented Oct 23, 2022

hi

import pytz
import datetime
now2 = datetime.datetime.now(tz=pytz.utc)
now = datetime.datetime.now(tz=datetime.timezone.utc)
from persiantools.jdatetime import JalaliDateTime
JalaliDateTime.to_jalali(now2).strftime("%d",   locale="en") # it works
JalaliDateTime.to_jalali(now).strftime("%d",   locale="en") # it dosn't works

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

@ali-master ali-master added help wanted Extra attention is needed question Further information is requested labels Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants