Opened 8 years ago

Closed 7 years ago

#5781 closed (invalid)

Timeuntil filter doesn't work as expected

Reported by: Luca Lenardi Owned by: nobody
Component: Template system Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Timeuntil doesn't consider the timezone of the date passed.

While timesince takes care of the timezone when creating the "now" date for comparison, timeuntil calls timesince with d = now, but without considering timezone.

Change History (2)

comment:1 Changed 8 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I'm not sure I understand the problem you are seeing. datetime.datetime.now() is already in the local timezone and Django sets up the environment so that local time is the zone given in settings.py. So we are implicitly taking the timezone into account.

Can you give an example showing the problem, please.

comment:2 Changed 7 years ago by mtredinnick

  • Resolution set to invalid
  • Status changed from new to closed

Closing, based on lack of feedback to previous comment. As far as I can tell, the timeuntil filter is working as expected (we are even testing that).

Note: See TracTickets for help on using tickets.
Back to Top