Reputation: 99
I just followed instructions on django website https://docs.djangoproject.com/en/dev/ref/class-based-views/generic-date-based/ and TodayArchiveView was showing the date for the next day.
my setting TIME_ZONE = 'UTC' and I changed it to TIME_ZONE = 'America/Los_Angeles' and TodayArchiveView worked but is this the right way? what if a user is in europe will he get the right time zone?
Upvotes: 2
Views: 4592
Reputation: 668
Your user will not see right time zone, because Django doesn't have a way to get user timezone as far as I know and it was also stated, here see accepted answer. You have three choices to get this right:
Upvotes: 6