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

Incorrect date and time in the relationship with a person in the target lists #10566

Open
SinergiaCRM opened this issue Oct 29, 2024 · 0 comments
Labels
Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Severity: Moderate Key function failed, but no or little impact Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Type: Bug Bugs within the core SuiteCRM codebase

Comments

@SinergiaCRM
Copy link
Contributor

Issue

When deleting a Target List that has related records, the value of the date_modified field of the prospect_lists_prospects table is modified, however the DB stores the local date, and not the UTC date and time as it should.

This happens because the field update is being done directly with SQL using the NOW() function.

Possible Fix

Use the value of UTC_TIMESTAMP() from php instead of the NOW() function in:

$query = "UPDATE prospect_lists_prospects SET deleted = 1, date_modified = NOW() WHERE prospect_list_id = '{$id}' AND deleted = 0";

Steps to Reproduce the Issue

1. Create a Target List
2. Add a person to the Target List
3. Check the date_modified field that appears in the prospect_lists_prospects table and note that the date and time is UTC.
4. Delete the Target List and note that the date_modified field has taken the local time and date

Context

No response

Version

7.14.4

What browser are you currently using?

Chrome

Browser Version

No response

Environment Information

PHP 7.4

Operating System and Version

Ubuntu 22.04

@SinergiaCRM SinergiaCRM added the Type: Bug Bugs within the core SuiteCRM codebase label Oct 29, 2024
ainaraRT pushed a commit to SinergiaTIC/SinergiaCRM that referenced this issue Oct 29, 2024
@johnM2401 johnM2401 added Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Severity: Moderate Key function failed, but no or little impact labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Severity: Moderate Key function failed, but no or little impact Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

2 participants