View Ticket
Ticket Hash: 5c1490e26b8b2f8689896df9e1632a249c95dbb7
Title: The ticket comments appear with the time always on UTC
Status: Open Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Open
Last Modified: 2010-12-31 07:12:49
Version Found In: 12a79e5b93
The Timeline page, and the Ticket History page appear with proper localtime if the server is configured to show local time.
But the ticket page, where there are introductions to comments like "xxxx added on 2010-10-20 15:44:03:", this always appears in UTC time.

<hr /><i>anonymous added on 2010-10-20 21:02:25:</i><br />
I see it's written in the artifact in plain text, so I propose adding "UTC" in the time string.

As in "xxx added on 2010-03-04 15:32 UTC: ".

<hr /><i>anonymous claiming to be Alex added on 2010-12-30 11:53:21:</i><br />
I attach a patch which adds a TH1 function "datelocal" which allows the ticket comment timestamps to be in the local time.

<hr /><i>anonymous claiming to be Alex added on 2010-12-30 13:27:09:</i><br />
I made a better patch, please ignore the one attached as "aa".<br>
It adds a TH1 function datetolocal which converts a date-and-time parameter from UTC into local time zone. Usage (on Edit ticket page):<br>
set ctxt "$ctxt added on &#91;datetolocal &#91;date&#93;&#93;:&lt;/i&gt;&lt;br /&gt;\n$cmappnd"<br>
or (on View ticket page)<br>
&lt;th1&gt;html &#91;datetolocal $tkt_datetime&#93;&lt;/th1&gt;

<hr /><i>anonymous claiming to be Alex added on 2010-12-31 07:12:49 UTC:</i><br />
Maybe it should be a separate ticket, but the fix that DRH made in does not allow the View ticket page to show last modified time in local time zone. That's why in my patch I made date a parameter passed to 'datetolocal' function instead of always returning 'now'. Perhaps make date-to-be-converted an optional parameter to 'date' function too?