Fossil SCM

Change all datetime() calls in tktsetup.c to use toLocal() as their second argument so that they display in the configured timezone. This should resolve [forum:82ac9af1533f78f7 | forum thread 82ac9af1533f78f7].

stephan 2025-08-01 12:08 trunk
Commit 2a39681ad16f6f5984914994d41b10a7449d28f5220a0158de9d124ea5be8c7a
1 file changed +4 -4
+4 -4
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -603,11 +603,11 @@
603603
@ }
604604
@ }
605605
@ }
606606
@ set seenRow 0
607607
@ set alwaysPlaintext [info exists plaintext]
608
-@ query {SELECT datetime(tkt_mtime) AS xdate, login AS xlogin,
608
+@ query {SELECT datetime(tkt_mtime,toLocal()) AS xdate, login AS xlogin,
609609
@ mimetype as xmimetype, icomment AS xcomment,
610610
@ username AS xusername
611611
@ FROM ticketchng
612612
@ WHERE tkt_id=$tkt_id AND length(icomment)>0} {
613613
@ if {$seenRow} {
@@ -789,11 +789,11 @@
789789
@ </tr>
790790
@
791791
@ <th1>
792792
@ set seenRow 0
793793
@ set alwaysPlaintext [info exists plaintext]
794
-@ query {SELECT datetime(tkt_mtime) AS xdate, login AS xlogin,
794
+@ query {SELECT datetime(tkt_mtime,toLocal()) AS xdate, login AS xlogin,
795795
@ mimetype as xmimetype, icomment AS xcomment,
796796
@ username AS xusername
797797
@ FROM ticketchng
798798
@ WHERE tkt_id=$tkt_id AND length(icomment)>0} {
799799
@ if {$seenRow} {
@@ -926,12 +926,12 @@
926926
@ WHEN status='Fixed' THEN '#cfe8bd'
927927
@ WHEN status='Tested' THEN '#bde5d6'
928928
@ WHEN status='Deferred' THEN '#cacae5'
929929
@ ELSE '#c8c8c8' END AS 'bgcolor',
930930
@ substr(tkt_uuid,1,10) AS '#',
931
-@ datetime(tkt_ctime) AS 'created',
932
-@ datetime(tkt_mtime) AS 'modified',
931
+@ datetime(tkt_ctime,toLocal()) AS 'created',
932
+@ datetime(tkt_mtime,toLocal()) AS 'modified',
933933
@ type,
934934
@ status,
935935
@ subsystem,
936936
@ title,
937937
@ comment AS '_comments'
938938
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -603,11 +603,11 @@
603 @ }
604 @ }
605 @ }
606 @ set seenRow 0
607 @ set alwaysPlaintext [info exists plaintext]
608 @ query {SELECT datetime(tkt_mtime) AS xdate, login AS xlogin,
609 @ mimetype as xmimetype, icomment AS xcomment,
610 @ username AS xusername
611 @ FROM ticketchng
612 @ WHERE tkt_id=$tkt_id AND length(icomment)>0} {
613 @ if {$seenRow} {
@@ -789,11 +789,11 @@
789 @ </tr>
790 @
791 @ <th1>
792 @ set seenRow 0
793 @ set alwaysPlaintext [info exists plaintext]
794 @ query {SELECT datetime(tkt_mtime) AS xdate, login AS xlogin,
795 @ mimetype as xmimetype, icomment AS xcomment,
796 @ username AS xusername
797 @ FROM ticketchng
798 @ WHERE tkt_id=$tkt_id AND length(icomment)>0} {
799 @ if {$seenRow} {
@@ -926,12 +926,12 @@
926 @ WHEN status='Fixed' THEN '#cfe8bd'
927 @ WHEN status='Tested' THEN '#bde5d6'
928 @ WHEN status='Deferred' THEN '#cacae5'
929 @ ELSE '#c8c8c8' END AS 'bgcolor',
930 @ substr(tkt_uuid,1,10) AS '#',
931 @ datetime(tkt_ctime) AS 'created',
932 @ datetime(tkt_mtime) AS 'modified',
933 @ type,
934 @ status,
935 @ subsystem,
936 @ title,
937 @ comment AS '_comments'
938
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -603,11 +603,11 @@
603 @ }
604 @ }
605 @ }
606 @ set seenRow 0
607 @ set alwaysPlaintext [info exists plaintext]
608 @ query {SELECT datetime(tkt_mtime,toLocal()) AS xdate, login AS xlogin,
609 @ mimetype as xmimetype, icomment AS xcomment,
610 @ username AS xusername
611 @ FROM ticketchng
612 @ WHERE tkt_id=$tkt_id AND length(icomment)>0} {
613 @ if {$seenRow} {
@@ -789,11 +789,11 @@
789 @ </tr>
790 @
791 @ <th1>
792 @ set seenRow 0
793 @ set alwaysPlaintext [info exists plaintext]
794 @ query {SELECT datetime(tkt_mtime,toLocal()) AS xdate, login AS xlogin,
795 @ mimetype as xmimetype, icomment AS xcomment,
796 @ username AS xusername
797 @ FROM ticketchng
798 @ WHERE tkt_id=$tkt_id AND length(icomment)>0} {
799 @ if {$seenRow} {
@@ -926,12 +926,12 @@
926 @ WHEN status='Fixed' THEN '#cfe8bd'
927 @ WHEN status='Tested' THEN '#bde5d6'
928 @ WHEN status='Deferred' THEN '#cacae5'
929 @ ELSE '#c8c8c8' END AS 'bgcolor',
930 @ substr(tkt_uuid,1,10) AS '#',
931 @ datetime(tkt_ctime,toLocal()) AS 'created',
932 @ datetime(tkt_mtime,toLocal()) AS 'modified',
933 @ type,
934 @ status,
935 @ subsystem,
936 @ title,
937 @ comment AS '_comments'
938

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button