Opened 6 years ago

Closed 6 years ago

#12123 closed (fixed)

dateformat tests fail on first of the month if in GMT+ timezone

Reported by: russellm Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The dateformat tests set the system timezone to Europe/Copenhagen, but doesn't revert this setting.

As a result, the generic date_archive view test fails during the morning of the first of the month because datetime.now() returns the date in Copenhagen, not the date in settings.TIMEZONE.

Change History (4)

comment:1 Changed 6 years ago by russellm

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

(In [11693]) Fixed #12123 -- Refactored dateformat tests to use unittest. This is needed so that we have a reliable teardown that can reset the timezone at the end of the test.

comment:2 Changed 6 years ago by russellm

(In [11694]) [1.1.X] Fixed #12123 -- Refactored dateformat tests to use unittest. This is needed so that we have a reliable teardown that can reset the timezone at the end of the test.

Backport of r11693 from trunk.

comment:3 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution fixed deleted
  • Status changed from closed to reopened

Oops - there's a dependency on the dateformat tests in utils.dateformat. A fix is on the way.

comment:4 Changed 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [11696]) [1.1.X] Fixed #12123 -- Updated the utils.dateformat test to be a unittest too, due to a dependency on the old dateformat test.

Backport of r11695 from trunk.

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