Skip to content

Commit

Permalink
Merge pull request #560 from coders4help/develop
Browse files Browse the repository at this point in the history
Apply timezone related fix
  • Loading branch information
christophmeissner authored Apr 3, 2022
2 parents 7027789 + 98bcde0 commit 6e26ec1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scheduler/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from django.db import models
from django.utils import timezone
from django.utils.timezone import get_current_timezone

from places import models as place_models
from .settings import DEFAULT_SHIFT_CONFLICT_GRACE
Expand All @@ -19,8 +20,7 @@ def on_shiftdate(self, shiftdate):
shiftdate. That means shifts that intersect with the day of
shiftdate.
"""
# make sure, shiftdate is a date and not a datetime
shiftdate = datetime.combine(shiftdate, time.min).date()
shiftdate = datetime.combine(shiftdate, time(tzinfo=get_current_timezone()))
return self.filter(
ending_time__gte=shiftdate, starting_time__lt=shiftdate + timedelta(days=1)
)
Expand Down
2 changes: 1 addition & 1 deletion volunteer_planner/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
EMAIL_PASS = os.environ.get("SMTP_PASS")
EMAIL_USE_TLS = False

SESSION_COOKI_AGE = 28 * 24 * 3600
SESSION_COOKIE_AGE = 28 * 24 * 3600
SESSION_COOKIE_SECURE = True

CACHES = {
Expand Down

0 comments on commit 6e26ec1

Please sign in to comment.