kennethreitz / maya

Datetimes for Humans™
MIT License
3.41k stars 196 forks source link

Can set default timezone? #158

Closed nickhell closed 6 years ago

nickhell commented 6 years ago

Can set default timezone? I see, change timezone from UTC to US/Eastern, like maya.now().datetime(to_timezone='US/Eastern', naive=True). But i must call it everytime, can i set default timezone? Then in my application, i created the timezone of datetime is US/Eastern.

nickhell commented 6 years ago

I see maya.now().local_datetime(). my issue is solved.

Owyn commented 3 months ago

I see maya.now().local_datetime(). my issue is solved.

does it still work for you?

It errors for me : AttributeError: 'zoneinfo.ZoneInfo' object has no attribute 'zone'