From 6c89749f0a0c77e3a56a68df8709daf9c9f2f33c Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 3 Feb 2011 13:30:47 +1300 Subject: Add timestamps to flows. For now, these are only displayed on the connection view screen, with second granularity. --- libmproxy/utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libmproxy/utils.py') diff --git a/libmproxy/utils.py b/libmproxy/utils.py index 7b9d0e32..ee0d9b43 100644 --- a/libmproxy/utils.py +++ b/libmproxy/utils.py @@ -13,9 +13,15 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import re, os, subprocess +import re, os, subprocess, datetime from contrib import BeautifulSoup + +def format_timestamp(s): + d = datetime.datetime.fromtimestamp(s) + return d.strftime("%Y-%m-%d %H:%M:%S") + + def isBin(s): """ Does this string have any non-ASCII characters? -- cgit v1.2.3