Possible Duplicate:
Converting string into datetime
What's a good way to convert a string of text (that represents a time) into a timestamp.
Times could come in various formats that are not predictable.
'January 2, 2012'
'2012-01-05 13:01:51'
'2012-01-01'
All outputs should be timestamps:
1325480400
1325786511
1325394000
The time.strptime() function requires that inputs be consistent. I'm parsing a list of user-submitted dates that have various time formats.