Date range filters (Today, Last 7 days) return no data when host time differs from user profile timezone (Time Drift) #22144

Open
opened 2026-02-21 20:15:57 -05:00 by yindo · 1 comment
Owner

Originally created by @Theysua on GitHub (Feb 9, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.12.1

Cloud or Self Hosted

Self Hosted (Source), Self Hosted (Docker)

Steps to reproduce

  • Set up a local Dify instance using Docker.
  • Ensure there is a time difference between your local machine and the UTC time stored in the database (or simulate this by changing your local system time to "Yesterday").
  • Create some conversation/log data (this will be stored with the current UTC timestamp).
  • Go to Logs & Ann. > Logs or Overview .
  • Select the "Today" filter.
  • Observe that the list is empty, even though data was just created.
  • Switch the filter to "All time" .
  • Observe that the data appears correctly.

✔️ Expected Behavior

The "Today" filter should respect the User Profile Timezone setting. If my profile is set to a timezone where it is currently "Today" (matching the server data), the filter should return the correct records, regardless of the host machine's local system time.

Actual Behavior

The filter uses the host machine's local date, resulting in a query for a past date range that excludes the newly created data.

Image Image
Originally created by @Theysua on GitHub (Feb 9, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.12.1 ### Cloud or Self Hosted Self Hosted (Source), Self Hosted (Docker) ### Steps to reproduce - Set up a local Dify instance using Docker. - Ensure there is a time difference between your local machine and the UTC time stored in the database (or simulate this by changing your local system time to "Yesterday"). - Create some conversation/log data (this will be stored with the current UTC timestamp). - Go to Logs & Ann. > Logs or Overview . - Select the "Today" filter. - Observe that the list is empty, even though data was just created. - Switch the filter to "All time" . - Observe that the data appears correctly. ### ✔️ Expected Behavior The "Today" filter should respect the User Profile Timezone setting. If my profile is set to a timezone where it is currently "Today" (matching the server data), the filter should return the correct records, regardless of the host machine's local system time. ### ❌ Actual Behavior The filter uses the host machine's local date, resulting in a query for a past date range that excludes the newly created data. <img width="2553" height="915" alt="Image" src="https://github.com/user-attachments/assets/782b014e-e442-49ed-b8b0-dc3fd0344468" /> <img width="2556" height="714" alt="Image" src="https://github.com/user-attachments/assets/2475e2a8-4041-421e-94b1-2fe337851085" />
yindo added the 🐞 bug label 2026-02-21 20:15:57 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 9, 2026):

This bug is confirmed and tracked: when the host/server time differs from your user profile timezone, date filters like "Today" and "Last 7 days" can return no data because the frontend was using the host's local time instead of your profile's timezone. The backend already converts date filters to UTC using your profile timezone, but the frontend date picker did not always pass the correct timezone, causing the mismatch and missing logs in filtered views (code reference).

A fix for this was merged recently: the date picker now receives your user profile timezone from the app context, so date filters will match your expected local day regardless of the server or Docker timezone (PR #31831, merged 2026-02-09). Upgrading to the latest Dify version will resolve this issue.

If you can't upgrade right away, you can try to align your Docker and backend timezone settings as a workaround, but this won't fully solve the problem if users are in different timezones. For best results, set your timezone in your Dify profile and use the latest release for correct date filtering in logs and analytics.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 9, 2026): <!-- Answer --> This bug is confirmed and tracked: when the host/server time differs from your user profile timezone, date filters like "Today" and "Last 7 days" can return no data because the frontend was using the host's local time instead of your profile's timezone. The backend already converts date filters to UTC using your profile timezone, but the frontend date picker did not always pass the correct timezone, causing the mismatch and missing logs in filtered views [(code reference)](https://github.com/langgenius/dify/blob/a1fc280102731fad77458ceb940fde9864703427/api/controllers/console/app/conversation.py#L362-L375). A fix for this was merged recently: the date picker now receives your user profile timezone from the app context, so date filters will match your expected local day regardless of the server or Docker timezone [(PR #31831, merged 2026-02-09)](https://github.com/langgenius/dify/pull/31831). Upgrading to the latest Dify version will resolve this issue. If you can't upgrade right away, you can try to align your Docker and backend timezone settings as a workaround, but this won't fully solve the problem if users are in different timezones. For best results, set your timezone in your Dify profile and use the latest release for correct date filtering in logs and analytics. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/d2e74fec-69d4-4b3c-a7fa-a851e464d79b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/d2e74fec-69d4-4b3c-a7fa-a851e464d79b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/d2e74fec-69d4-4b3c-a7fa-a851e464d79b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/d2e74fec-69d4-4b3c-a7fa-a851e464d79b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d2e74fec-69d4-4b3c-a7fa-a851e464d79b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/d2e74fec-69d4-4b3c-a7fa-a851e464d79b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d2e74fec-69d4-4b3c-a7fa-a851e464d79b?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20bug%20is%20confirmed%20and%20tracked%3A%20when%20the%20host/server%20time%20differs%20from%20your%20user%20profile%20timezone%2C%20date%20filters%20like%20%22Today%22%20and%20%22Last%207%20days%22%20can%20return%20no%20data%20because%20the%20frontend%20was%20using%20the%20host%27s%20local%20time%20instead%20of%20your%20profile%27s%20timezone.%20The%20backend%20already%20converts%20date%20filters%20to%20UTC%20using%20your%20profile%20timezone%2C%20but%20the%20frontend%20date%20picker%20did%20not%20always%20pass%20the%20correct%20timezone%2C%20causing%20the%20mismatch%20and%20missing%20logs%20in%20filtered%20views%20%5B%28code%20reference%29%5D%28https%3A//github.com/langgenius/dify/blob/a1fc280102731fad77458ceb940fde9864703427/api/controllers/console/app/conversation.py%23L362-L375%29.%0A%0AA%20fix%20for%20this%20was%20merged%20recently%3A%20the%20date%20picker%20now%20receives%20your%20user%20profile%20timezone%20from%20the%20app%20context%2C%20so%20date%20filters%20will%20match%20your%20expected%20local%20day%20regardless%20of%20the%20server%20or%20Docker%20timezone%20%5B%28PR%20%2331831%2C%20merged%202026-02-09%29%5D%28https%3A//github.com/langgenius/dify/pull/31831%29.%20Upgrading%20to%20the%20latest%20Dify%20version%20will%20resolve%20this%20issue.%0A%0AIf%20you%20can%27t%20upgrade%20right%20away%2C%20you%20can%20try%20to%20align%20your%20Docker%20and%20backend%20timezone%20settings%20as%20a%20workaround%2C%20but%20this%20won%27t%20fully%20solve%20the%20problem%20if%20users%20are%20in%20different%20timezones.%20For%20best%20results%2C%20set%20your%20timezone%20in%20your%20Dify%20profile%20and%20use%20the%20latest%20release%20for%20correct%20date%20filtering%20in%20logs%20and%20analytics.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/32121)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22144