Skip to content

problem with with datetime.timezone #11

@moosavimaleki

Description

@moosavimaleki

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

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is neededquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions