Skip to content

[Bug] Start date filter on the Competency Management page uses UTC days, while Studio shows course dates in the user's time zone #834

Closed
openedx/frontend-app-authoring
#3278

Description

@dvarenikqaconsultant

Parent: #670 (front end). Related: #669 (back end).

Environment: Master Sandbox, https://apps.master.openedx.io/authoring/taxonomy/45/competencies

Summary

The course search on the Competency Management page filters courses by start date. The user picks a calendar day in their own time zone, but the back end compares it against a UTC day. When a course starts late in the evening UTC, or early in the morning UTC, the two days are different, and the filter does not return a course that Studio shows as starting on the selected day.

How the filter works now

  1. The date picker sends the selected local calendar day as a plain date, for example start_date_on_or_after=2027-07-01&start_date_on_or_before=2027-07-01.
  2. The back end ([BE] Add start-date range filter and outline delivery for accessible courses (Competency Criteria Associations) #669) treats that date as a UTC day: it returns courses whose start is at or after 2027-07-01T00:00:00Z and before 2027-07-02T00:00:00Z.
  3. Studio pages, for example the course outline, show the same start date converted to the user's local time zone.

So a user who is not in UTC sees one date on the course page and has to pick a different date in the filter to find that course.

Steps to reproduce (time zones east of UTC, for example Georgia, UTC+4)

  1. Open the course outline of course-v1:Axim+DC2+2026_T1 in Studio https://apps.master.openedx.io/authoring/course/course-v1:Axim+DC2+2026_T1. Its start is 2027-06-30T22:00:00Z, so the page shows July 1, 2027.
  2. Open https://apps.master.openedx.io/authoring/taxonomy/45/competencies and select any competency.
  3. Press "Start Date" and select the range July 1, 2027 to July 1, 2027.
  4. Look for "Axim DC2" in the results.
  5. Change the range to June 30, 2027 to June 30, 2027.

Expected: The course is found by the July 1 filter, because Studio shows July 1 as its start date.

Actual: The July 1 filter does not return the course. The June 30 filter returns it.

Image Image Image

Reproducing from a time zone west of UTC (for example the US)

With the course above, a user in the US does not see the bug: 2027-06-30T22:00:00Z is still June 30 in every US time zone (for example 18:00 EDT or 15:00 PDT), so the local day and the UTC day match. The bug only shows when the local day and the UTC day of the course start differ. Either of these two options makes that happen:

Option A: override the browser time zone. This option reuses the course above and needs no new data.

  1. In Chrome, open DevTools, then the three-dot menu, then "More tools", then "Sensors".
  2. Under "Location", choose a preset east of UTC (for example "Berlin" or "Mumbai"), or choose "Other" and enter the timezone ID Asia/Tbilisi.
  3. Keep DevTools open and reload the page. The override applies only while DevTools is open.
  4. Follow the steps in the section above.

Option B: use a course that starts early in the morning UTC.

  1. In Studio, create a course (or edit a test course) and open "Schedule & details".
  2. Set the course start date to July 1, 2027 and the start time to 02:00. Studio enters the start time in UTC, so the stored start is 2027-07-01T02:00:00Z. In the US that is June 30 (22:00 EDT or 19:00 PDT), and the course outline shows June 30.
  3. On the Competency Management page, filter by June 30, 2027 to June 30, 2027. The course is not found.
  4. Filter by July 1, 2027 to July 1, 2027. The course is found, although Studio shows June 30 as its start date.

Notes

Activity

  1. dvarenikqaconsultant commented on Oct 10, 2026

    @dvarenikqaconsultant
    Author

    Environment: Master Sandbox (https://apps.master.openedx.io/)
    Fix tested: openedx/frontend-app-authoring#3278, together with the back end change openedx/openedx-platform#39163 (both merged on 2026-10-09)
    Test user: dmitryvarenikqa (staff)
    Test type: UI, with the browser time zone set to Asia/Tbilisi (UTC+4) and America/New_York (UTC-4 in July)
    Result: ✅ The bug is fixed. The start date filter now returns a course on the day that Studio shows as its start date in the user's time zone. All 7 checks passed.

    Course start dates shown in Studio

    The course outline shows the start date in the browser's time zone. This is the day a user expects the filter to match.

    Course Start (UTC) Browser time zone Start date on the course outline
    course-v1:Axim+DC2+2026_T1 2027-06-30 22:00 Asia/Tbilisi Jul 01, 2027
    course-v1:Axim+DC2+2026_T1 2027-06-30 22:00 America/New_York Jun 30, 2027
    course-v1:QA842+B+2027 2027-07-01 02:00 America/New_York Jun 30, 2027

    Filter results

    On the Competency Management page, I selected a competency, searched for the course, and picked the date range with the "Start Date" filter.

    # Scenario Selected range Expected Actual Result
    1 East of UTC (steps to reproduce from this issue), Asia/Tbilisi, Axim DC2 Jul 1 to Jul 1, 2027 Course is found Dmitry's Course #2 is found ✅
    2 Same as 1 Jun 30 to Jun 30, 2027 Course is not found "No courses match your search." ✅
    3 Same as 1 Jun 30 to Jul 1, 2027 Course is found Dmitry's Course #2 is found ✅
    4 West of UTC (Option B from this issue), America/New_York, QA842-B Jun 30 to Jun 30, 2027 Course is found QA842-B Inside Range is found ✅
    5 Same as 4 Jul 1 to Jul 1, 2027 Course is not found "No courses match your search." ✅
    6 Same as 4 Jun 30 to Jul 1, 2027 Course is found QA842-B Inside Range is found ✅
    7 Regression: America/New_York, Axim DC2 (a US user did not see the bug before the fix) Jun 30 to Jun 30, 2027 Course is found Dmitry's Course #2 is found ✅

    Request sent by the page

    In every check, the page sends the selected days as the start and end of the local day, with the browser's UTC offset, instead of a plain YYYY-MM-DD date. Examples:

    • Check 1 (Asia/Tbilisi, Jul 1): start_date_on_or_after=2027-07-01T00:00:00.000+04:00&start_date_on_or_before=2027-07-01T23:59:59.999+04:00
    • Check 3 (Asia/Tbilisi, Jun 30 to Jul 1): start_date_on_or_after=2027-06-30T00:00:00.000+04:00&start_date_on_or_before=2027-07-01T23:59:59.999+04:00
    • Check 4 (America/New_York, Jun 30): start_date_on_or_after=2027-06-30T00:00:00.000-04:00&start_date_on_or_before=2027-06-30T23:59:59.999-04:00
    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions