more tz aware now
This commit is contained in:
parent
c192f91a03
commit
fccc67fba9
1 changed files with 2 additions and 1 deletions
|
@ -24,8 +24,9 @@ def index(request):
|
|||
now = request.GET.get("now")
|
||||
if request.user.is_staff and now:
|
||||
now = datetime.strptime(now, TS_FORMAT)
|
||||
now = timezone.make_aware(now, timezone.get_default_timezone())
|
||||
elif request.user.is_staff:
|
||||
now = timezone.now()
|
||||
now = timezone.make_aware(datetime.now(), timezone.get_default_timezone())
|
||||
else:
|
||||
now = None
|
||||
week, archive = models.Item.public(now)
|
||||
|
|
Loading…
Reference in a new issue