I had a terrible time tracing this bug, for some reason the dates were not displaying in format d/m/Y
There are 2 seperate issues.
Due date
For some reason the due-date of a task was converted twice from db to display format
this happens in Task.php around line 551
Code:
$dd = $timedate->to_display_date($date_due, false);
change this to:
and this issue will be fixed.
Now the 2nd issue concerns the display of start date and/or due date without their times.
If this happens the date will display as format YYYY/MM/DD instead of the required format, this is because the fetched row will miss the time(s) thus the conversion of the date will not be executed.
You have 2 solutions to this problem:
1. Remove the rel_field from date_due and date_start in /modules/Tasks/vardefs.php
I'm not sure what the effect will be when the users will be in different timezones, SUGAR team comment ?
2. Change the Sugarbean.php :
around line 1711 find:
Code:
if(!empty($this->$rel_field))
{
$this->$rel_field=from_db_convert($this->$rel_field, 'time');
$mergetime = $timedate->merge_date_time($this->$field,$this->$rel_field);
$this->$field = $timedate->to_display_date($mergetime);
$this->$rel_field = $timedate->to_display_time($mergetime);
} insert the following immediately after the last "}"
Code:
else
{
$this->$field = $timedate->to_display_date($this->$field, false);
} Problem fixed
I'm testing sugar OS version 4.5.1e
Bookmarks