Project Tasks, the date is altered to 1 day in each edition #4817

Open
opened 2026-02-20 16:24:28 -05:00 by deekerman · 7 comments
Owner

Originally created by @kunanSA on GitHub (Jul 22, 2022).

Issue

When creating a task from the Gantt view in the Project, the start date changes to 1 day before. The same happens if the task is edited, the date is altered again to 1 day ago.

Expected Behavior

Do not delay 1 day behind, the date established in the "Start date" field

Steps to Reproduce

  1. Create any project or edit any
  2. In the registry, display the actions menu and click on 'View Gantt'
  3. On the Gantt view, create a new task and specify the start date and complete the rest of the fields in the popup with a duration of 2 hours
  4. Record the record and view the difference of 1 day delay on the left graph. While in the right graphic, the date is the one recorded correctly.
  5. Edit the saved record again and observe the 'Start' field that is affected to 1 day before.
    6 . When saving the modified record again, the start date is changed back to 1 day before.

Context

This bug affects all project task records created from a new or existing project. This problem does not occur if the project tasks are created or edited from their corresponding module.

As this problem exists in Suitecrm 7.10.7, it was verified that the following versions continue the problem until 7.10.36. Then all skipped versions of 7.11.x were verified and it was verified that until the latest version 7.12.6 the problem continues to exist.

It is believed that this same behavior is also related to the REPORTS module.

Your Environment

  • SuiteCRM Version used: 7.10.x 7.11.x 7.12.x
  • Environment name and version: PHP 7.x
Originally created by @kunanSA on GitHub (Jul 22, 2022). #### Issue When creating a task from the Gantt view in the Project, the start date changes to 1 day before. The same happens if the task is edited, the date is altered again to 1 day ago. #### Expected Behavior Do not delay 1 day behind, the date established in the "Start date" field #### Steps to Reproduce 1. Create any project or edit any 2. In the registry, display the actions menu and click on 'View Gantt' 3. On the Gantt view, create a new task and specify the start date and complete the rest of the fields in the popup with a duration of 2 hours 4. Record the record and view the difference of 1 day delay on the left graph. While in the right graphic, the date is the one recorded correctly. 5. Edit the saved record again and observe the 'Start' field that is affected to 1 day before. 6 . When saving the modified record again, the start date is changed back to 1 day before. #### Context This bug affects all project task records created from a new or existing project. This problem does not occur if the project tasks are created or edited from their corresponding module. As this problem exists in Suitecrm 7.10.7, it was verified that the following versions continue the problem until 7.10.36. Then all skipped versions of 7.11.x were verified and it was verified that until the latest version 7.12.6 the problem continues to exist. It is believed that this same behavior is also related to the REPORTS module. #### Your Environment * SuiteCRM Version used: 7.10.x 7.11.x 7.12.x * Environment name and version: PHP 7.x
Author
Owner

@johnM2401 commented on GitHub (Jul 26, 2022):

Hey there,

Sorry, I can't seem to replicate this at the moment
Perhaps I have misunderstood some of your steps?

When creating Tasks, the date seems to be correct on both sides of the graph:
image

Even if I modify the tasks, they seem to stay at the correct start date:
image


Do you know if anything further is needed, to replicate?

Do you perhaps have any further information that might clarify this issue?
(ie: Screenshots, Which PHP versions you have tried this on)

Additionally, which timezone do you have set for your CRM / User?
Occasionally, the CRM can have some issues with Timezones / Date fields, so it would be good to rule this out.

Thanks!

@johnM2401 commented on GitHub (Jul 26, 2022): Hey there, Sorry, I can't seem to replicate this at the moment Perhaps I have misunderstood some of your steps? When creating Tasks, the date seems to be correct on both sides of the graph: ![image](https://user-images.githubusercontent.com/13675281/181004240-56a48003-29b3-40c2-90b5-760362c2b7e3.png) Even if I modify the tasks, they seem to stay at the correct start date: ![image](https://user-images.githubusercontent.com/13675281/181004363-313b1c20-3d64-444b-93bb-a44e0f67c210.png) <br> Do you know if anything further is needed, to replicate? Do you perhaps have any further information that might clarify this issue? (ie: Screenshots, Which PHP versions you have tried this on) Additionally, which timezone do you have set for your CRM / User? Occasionally, the CRM can have some issues with Timezones / Date fields, so it would be good to rule this out. Thanks!
Author
Owner

@imoldovavan commented on GitHub (Sep 14, 2023):

I am having the same issue for two installs on Suitecrm.
brave_tLgWGtjNzb
The start date from the ghant chart is correct, the one from the list view is retarded by one day. Any sugestions???
Version 7.13.4
Sugar Version 6.5.25 (Build 344)

@imoldovavan commented on GitHub (Sep 14, 2023): I am having the same issue for two installs on Suitecrm. ![brave_tLgWGtjNzb](https://github.com/salesagility/SuiteCRM/assets/7970358/01e79631-66ae-4310-8046-e1b982a1188e) The start date from the ghant chart is correct, the one from the list view is retarded by one day. Any sugestions??? Version 7.13.4 Sugar Version 6.5.25 (Build 344)
Author
Owner

@pgorod commented on GitHub (Sep 15, 2023):

This could be just a PHP timezone issue. If you "pull" a date of by an hour or two, and it crosses midnight, it will appear in a different day.

@pgorod commented on GitHub (Sep 15, 2023): This could be just a PHP timezone issue. If you "pull" a date of by an hour or two, and it crosses midnight, it will appear in a different day.
Author
Owner

@imoldovavan commented on GitHub (Sep 15, 2023):

When this happens, the date jumps back one day in the list view. Been playing with setting the php timezone to UTC without any effect.

@imoldovavan commented on GitHub (Sep 15, 2023): When this happens, the date jumps back one day in the list view. Been playing with setting the php timezone to UTC without any effect.
Author
Owner

@imoldovavan commented on GitHub (Sep 15, 2023):

Looking at the database with phpmyadmin the date is saved correctly. It is displayed wrong in the list view. I will dig some more :)

@imoldovavan commented on GitHub (Sep 15, 2023): Looking at the database with phpmyadmin the date is saved correctly. It is displayed wrong in the list view. I will dig some more :)
Author
Owner

@pgorod commented on GitHub (Sep 15, 2023):

Remember to restart web server after any php.ini changes.
And check with a phpinfo page what are your effective values.

@pgorod commented on GitHub (Sep 15, 2023): Remember to restart web server after any php.ini changes. And check with a phpinfo page what are your _effective_ values.
Author
Owner

@imoldovavan commented on GitHub (Sep 15, 2023):

I did that.

Changing the line in Project/project_table.php from
.$timeDate->to_display_date($task->date_start, true).;
to
.$timeDate->to_display_date($task->date_start, false).;
fixed my problem. It is hacky but it works. :)
I would like to know why this happens, so I will do more digging.

@imoldovavan commented on GitHub (Sep 15, 2023): I did that. Changing the line in Project/project_table.php from `.$timeDate->to_display_date($task->date_start, true).;` to `.$timeDate->to_display_date($task->date_start, false).;` fixed my problem. It is hacky but it works. :) I would like to know why this happens, so I will do more digging.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4817
No description provided.