pinax-points icon indicating copy to clipboard operation
pinax-points copied to clipboard

Adds timezone support

Open tiagofassoni opened this issue 7 years ago • 1 comments

I changed the references to datetime.datetime.now to timezone.now from django.utils (source here

That way, if USE_TZ=False in settings, will use standard datetime. Otherwise, will have timezone support.

(sidenote: Yes, I'm making a pull request just to fix a warning. Why did I go to the trouble of doing that? I have to import around 400k things into a django instance which generate vote actions. The warnings alone were causing a 15 second delay for each 1000 votes. So, advantages of opensource right there!)

tiagofassoni avatar Jan 18 '18 20:01 tiagofassoni

Not sure how @paltman and @jtauber would feel about changing this. datetime is still used elsewhere in the app. Would it be strange to change it in only once place?

KatherineMichel avatar Aug 31 '19 17:08 KatherineMichel