Skip to content

Instantly share code, notes, and snippets.

@Dweez
Last active August 29, 2015 14:12
Show Gist options
  • Save Dweez/b8c2b9de6d3621cb75ef to your computer and use it in GitHub Desktop.
Save Dweez/b8c2b9de6d3621cb75ef to your computer and use it in GitHub Desktop.
return datetime from Twitter created_at
from datetime import datetime
import time
def makeDate(created_at):
tst = time.strptime(created_at,'%a %b %d %H:%M:%S +0000 %Y')
dt = datetime.fromtimestamp(time.mktime(tst))
return dt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment