CVS: tmda-cgi PendList.py,1.37,1.38
Jim Ramsay <[email protected]> Thu, 18 Mar 2004 10:59:19 -0800
| Newsgroups | gmane.mail.spam.tmda.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tmda/tmda-cgi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9860
Modified Files:
PendList.py
Log Message:
Slight effiency improvement for "N days ago" date format.
Index: PendList.py
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/PendList.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- PendList.py 18 Mar 2004 17:54:17 -0000 1.37
+++ PendList.py 18 Mar 2004 18:59:16 -0000 1.38
@@ -418,6 +418,8 @@
Count = 0
#InProcMsg = ""
inProcessLine = 0
+
+ nowTime = int(time.time())
for Msg in Msgs[FirstMsg:LastMsg]:
T["MsgID"] = Msg
if Count % 2 == 0 and OddRowColor is not None:
@@ -440,7 +442,7 @@
MsgTime = int(MsgObj.msgid.split('.')[0])
if DateFormat == "DaysAgo":
# Special Case! "n days ago"
- Today = (int(time.time()) / 86400)
+ Today = (nowTime / 86400)
MsgDay = (MsgTime / 86400)
DaysAgo = Today - MsgDay
if DaysAgo == 0: