Skip to content

Commit

Permalink
fixed timestamp display bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mpentler committed Feb 7, 2018
1 parent afbdd6f commit 5f577b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelog

### v0.5.2
- Fixed stupid bug where I'd used %S instead of %M for the time display. now they're correct

### v0.5.1
- more restructuring
- you can now customise the page title text
Expand Down
4 changes: 2 additions & 2 deletions teletext-twitter/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def write_timeline(twitter_object, config): # grab the latest timeline - only 5
for status in statuses: # iterate through our responses
tweet_text = clean_tweet(status.text)
tweet_time = time.strptime(status.created_at,"%a %b %d %H:%M:%S +0000 %Y")
tweet_human_time = time.strftime("%d-%b-%Y %H:%S", tweet_time) # reformat time/date output
tweet_human_time = time.strftime("%d-%b-%Y %H:%M", tweet_time) # reformat time/date output
tweet_username = status.user.screen_name
tweet_text = textwrap.wrap(tweet_text, 39) # make sure our lines fit on the screen

Expand All @@ -70,7 +70,7 @@ def write_search_term(twitter_object, search_term, config): # search recent twee
for status in statuses: # iterate through our responses
tweet_text = clean_tweet(status.text) # process the tweet text
tweet_time = time.strptime(status.created_at,"%a %b %d %H:%M:%S +0000 %Y")
tweet_human_time = time.strftime("%d-%b-%Y %H:%S", tweet_time) # reformat time/date output
tweet_human_time = time.strftime("%d-%b-%Y %H:%M", tweet_time) # reformat time/date output
tweet_username = status.user.screen_name
tweet_text = textwrap.wrap(status.text, 39) # make sure our lines fit on the screen

Expand Down

0 comments on commit 5f577b4

Please sign in to comment.