There are alternatives of django-timezones?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
50 views
Found module datetied to time zones.


The author of the well thought out it (for the functionality it suits me), but it looks like in practice and not used. Because it is full of errors, including no support for mysql, and it alone can generate hundreds of queries per page.


There are of course different ppl were, but substantially the situation, none of them correct.


So the question is, is there another common means of working with dates tied to time zones for Django?
by | 50 views

2 Answers

0 like 0 dislike
View it here: Django and timezones
by
0 like 0 dislike
use django-timezones like this:
\r
class City(models.Model): name = models.CharField(u City', max_length=30) timezone = TimeZoneField(u 'timezone') def now(self): return datetime.now(self.timezone).replace(tzinfo=None) 

And then, knowing the current time in the city, you need to carry out any calculations — instead of just datetime.now() to use something like self.city.now().
\r
All the extra bells and whistles of django-timezones seem not very useful not figured out how to use them can — there the devil is in the details, as usual. Additional calculations can be performed using the standard datetime or (and) third-party dateutil.
by

Related questions

0 like 0 dislike
1 answer
asked Mar 26, 2019 by Imbolc
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
27,911 users