Fix timezones
This commit is contained in:
parent
ce7d479f19
commit
7bfa094ac7
@ -20,6 +20,8 @@
|
|||||||
<span class="today__time">{{event.time|time:"TIME_FORMAT"}}</span>
|
<span class="today__time">{{event.time|time:"TIME_FORMAT"}}</span>
|
||||||
<span><a href="{% url 'event-update' event.pk %}">Edit</a></span>
|
<span><a href="{% url 'event-update' event.pk %}">Edit</a></span>
|
||||||
</div>
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<p><em>Nothing for today.</em></p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -21,9 +21,9 @@ class ProfileView(LoginRequiredMixin, TemplateView):
|
|||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
today = date.today()
|
today = timezone.localtime(timezone.now()).date()
|
||||||
tomorrow = today + timedelta(days=1)
|
tomorrow = today + timedelta(days=1)
|
||||||
enddate = today + timedelta(days=6)
|
enddate = today + timedelta(days=7)
|
||||||
context['profile'] = self.request.user.profile
|
context['profile'] = self.request.user.profile
|
||||||
context['latest_activity'] = LogEntry.objects.all()[:10]
|
context['latest_activity'] = LogEntry.objects.all()[:10]
|
||||||
context['today'] = Event.objects.filter(
|
context['today'] = Event.objects.filter(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user