arteria / django-openinghours

Allows to define opening hours and to verify if something, for example a store, is currently open.
MIT License
57 stars 38 forks source link

Django’s timezone support #18

Closed matiUniverse closed 7 years ago

matiUniverse commented 7 years ago

Hello!

I've just committed two little changes I made on utils.py file to add timezone support. It's working fine on my projet.

May be can be helpful for someone.

Thanks a lot for this app!

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.3%) to 56.026% when pulling de17873ee2b96dfd54650d089fe891a1e3e28274 on perroOne:patch-1 into 147e8d169324d8e196936b4eea11e27b17b8683e on arteria:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.3%) to 56.026% when pulling 98d9813b9b3e86899eb050c16d85735473a5ba75 on perroOne:patch-1 into 147e8d169324d8e196936b4eea11e27b17b8683e on arteria:master.

walterrenner commented 7 years ago

Hi @perroOne, thanks a lot for your PR.

I'm wondering if there is a difference between using pytz and django.utils.timezone.

If we can achieve the same behaviour using django.utils.timezone we should consider using it. So we avoid dependencies. What do you think?

philippeowagner commented 7 years ago

The django.utils.timezone module uses pytz when it's available and fallbacks when it isn't.