Mercurial > hg > egg-tcls
diff quotedb.tcl @ 422:880a07485275
Add utl_ctime() to utillib and use it elsewhere.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 08 Jan 2017 03:52:15 +0200 |
parents | 2968f335121a |
children | 825cac46b1cb |
line wrap: on
line diff
--- a/quotedb.tcl Sun Jan 08 01:44:19 2017 +0200 +++ b/quotedb.tcl Sun Jan 08 03:52:15 2017 +0200 @@ -48,13 +48,6 @@ } } -proc qdb_ctime {utime} { - if {$utime == "" || $utime == "*"} { - set utime 0 - } - - return [clock format $utime -format "%d.%m.%Y %H:%M"] -} proc qdb_msg_do {apublic anick achan amsg} { global qdb_preferredmsg @@ -361,7 +354,7 @@ set usql "SELECT id AS quoteID, utime AS utime, utext AS utext, user AS uuser FROM $utable $fquery ORDER BY utime DESC LIMIT $ulimit" qdb_handle eval $usql { incr uresults - qdb_msg $upublic $unick $uchan $qdb_msg_search_fmt [list $quoteID $utext $uuser $utime [qdb_ctime $utime]] + qdb_msg $upublic $unick $uchan $qdb_msg_search_fmt [list $quoteID $utext $uuser $utime [utl_ctime $utime]] } if {$uresults == 0} {