You should take a look at moment which is the Python port of the excellent momentjs js lib.
One of its advantages is the support for ISO 8601 line formats, as well as the general format "%":
import moment time_string='2012-10-09T19:00:55Z' m = moment.date(time_string, '%Y-%m-%dT%H:%M:%SZ') print m.format('YYYY-MD H:M') print m.weekday
Result:
2012-10-09 19:10 2
brunetton Oct 07 '14 at 12:35 on 2014-10-07 12:35
source share