vTiger Comments Time Format

Lot of our clients using vTiger have complained about the default Comments time format (X days ago and similar).

To use a more standard timestamp, please edit the /modules/Vtiger/helpers/util.php file.

Comment out the original $dateTime function and enter the following instead for imperial:

 

public static function formatdatediffinstrings($datetime) {

// http://www.php.net/manual/en/datetime.diff.php#101029

$dateTime = Vtiger_Datetime_UIType::getDBDateTimeValue($dateTime);

return date("m-d-Y h:i:s a", strtotime($dateTime));


… or following for metric formats:

 

public static function formatdatediffinstrings($datetime) {

// http://www.php.net/manual/en/datetime.diff.php#101029

$dateTime = Vtiger_Datetime_UIType::getDBDateTimeValue($dateTime);

 return date("d-m-Y H:i:s", strtotime($dateTime));