osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now
I am trying to install a column that displays the Age of the Tickets in dayshttp://osticket.com/forum/discussion/80498/append-a-created-ticket-status-form-field-to-an-already-existing-column-in-the-main-ticket-view#latest
Osticket Version v1.9.6
MySql Version 5.5.54
In "tickets.inc.php" I have made progress using "strtotime" but I get an error with the "date",
The 'date' returns a value of -7200 . ( Not returning the correct value. )
The Now Returns a value of 1489269600 ( current date increasing with time )
Basically this is what I have done so far
around line 250 I have added
$sqldate = ('date');
$newdate = date('Y-m-d',strtotime($sqldate));
$sqldate2 = ('today UTC');
$newdate2 = date('Y-m-d',strtotime($sqldate2));
$timeopen = (strtotime($newdate)) ;
$age_date = (strtotime($newdate2)) ;
Then around line 500 (this is dynamic as I have a lot of construction text at present ) I simply subtracted them.
<td align="center" nowrap><?php echo ((($age_date) - ($timeopen ))/ 86400 ) ; ?></td>
Apparently strtotime does not have a problem with USA and European dates ,
I quote :
' Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash (/), then the American m/d/y is assumed; whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed.'
Can anybody help in moving this forward ?
All help will be MOST graciously appreciated