Skip to content

Commit

Permalink
Decode possible UTF-8 in formatted date.
Browse files Browse the repository at this point in the history
strftime will return an encoded string for some locales. Need to decode it before combining it with the other strings.
  • Loading branch information
drdrang committed Sep 23, 2012
1 parent 7fc9d80 commit bbbc590
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion archive-tweets.py
Expand Up @@ -41,7 +41,7 @@ def setup_api():
ts = utc.localize(t.created_at).astimezone(homeTZ)
lines = ['',
t.text,
ts.strftime(datefmt),
ts.strftime(datefmt).decode('utf8'),
urlprefix + t.id_str,
'- - - - -',
'']
Expand Down

0 comments on commit bbbc590

Please sign in to comment.