Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date Filter and Value Dates in Bank Entries Module Use Server Time Instead of Client Time #30718

Open
dikisiswanto opened this issue Aug 22, 2024 · 0 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@dikisiswanto
Copy link

Bug

Issue: Date Filter and Value Dates in Bank Entries Module Use Server Time Instead of Client Time

Description:

In the Bank Entries module of Dolibarr, both the date filter and value dates are currently based on the server's time zone (UTC). This causes issues for users in different time zones:

  1. Date Filtering:

    • The date filter uses UTC for processing, which results in inaccurate filtering for users in different time zones. For instance, a user in UTC+8 who selects a date range may see incorrect records if the server processes these dates in UTC.
  2. Value Dates Display:

    • Value dates are displayed in UTC, leading to confusion for users who are in different time zones.

Expected Behavior:

  1. Convert Dates to UTC on Client Side:

    • Dates selected for filtering should be converted from the user's local time zone (e.g., UTC+8) to UTC before being sent to the server.
  2. Server-Side Filtering:

    • The server should process the received UTC dates to accurately filter records in the Bank Entries module.
  3. Convert Dates Back to Local Time for Display:

    • Filtered results and value dates should be converted from UTC to the client's local time zone (e.g., UTC+8) for display purposes. This ensures that both the filtered results and value dates are shown accurately in the user's local time context.

Implementing these changes will ensure that the date filter and value dates are accurate and consistent according to the user's local time zone.

Dolibarr Version

19.0.2

Environment PHP

7.4.33

Environment Database

MySQL or MariaDB 8.0.39-cll-lve

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

@dikisiswanto dikisiswanto added the Bug This is a bug (something does not work as expected) label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

1 participant