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 [datetolocal [date]]:</i><br />\n$cmappnd"<br>
or (on View ticket page)<br>
<th1>html [datetolocal $tkt_datetime]</th1>
<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 http://fossil-scm.org/index.html/fdiff?v1=ef3bb3e834513608&v2=602acd7e19a26fb0 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?
|