Started working on formatting the post timestamps
This commit is contained in:
parent
928b75ab95
commit
06f571767e
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# Custom twitter client... mostly for learning Python
|
||||
|
||||
import sys, twitter, Tkinter, Pmw, ConfigParser, os, tkMessageBox
|
||||
import sys, twitter, Tkinter, Pmw, ConfigParser, os, tkMessageBox, datetime
|
||||
|
||||
|
||||
class TwitWindow:
|
||||
|
@ -84,6 +84,12 @@ class TwitWindow:
|
|||
if i < len(statuses):
|
||||
# Update the label with the user's name and screen name
|
||||
user = statuses[i].user
|
||||
|
||||
# fixme: need to find a way to detect local timezone and print in that
|
||||
# Also need to decide how to format the output... maybe use a config var?
|
||||
# timestamp = datetime.datetime.strptime(statuses[i].created_at, "%a %b %d %H:%M:%S %z %Y")
|
||||
# timestring = timestamp.strftime()
|
||||
|
||||
labeltext = user.name + " (" + user.screen_name + ") " + statuses[i].created_at
|
||||
self.labels[i].config(text=labeltext)
|
||||
|
||||
|
|
Reference in New Issue
Block a user