Include proper date and time in generated pages, rather than a UNIX timestamp

master
Sven Slootweg 13 years ago
parent 293775dd4b
commit e26ce4835e

@ -1,6 +1,7 @@
#!/usr/bin/python #!/usr/bin/python
import os, argparse, hashlib, sqlite3, time, shutil, cgi import os, argparse, hashlib, sqlite3, time, shutil, cgi
from datetime import datetime
parser = argparse.ArgumentParser(description='Renders static HTML pages and indexes from an SQLite database of emails and an attachment folder.') parser = argparse.ArgumentParser(description='Renders static HTML pages and indexes from an SQLite database of emails and an attachment folder.')
@ -45,6 +46,7 @@ for message_id, sender, recipient, subject, timestamp, textbody, htmlbody, sha1_
recipient = cgi.escape(recipient, True) recipient = cgi.escape(recipient, True)
subject = cgi.escape(subject, True) subject = cgi.escape(subject, True)
message_id = cgi.escape(message_id, True) message_id = cgi.escape(message_id, True)
timestamp = datetime.fromtimestamp(timestamp).strftime("%A %B %e, %Y %H:%M:%S")
versions = {} versions = {}

Loading…
Cancel
Save