I have used a ruby script to convert iso time stamp to epoch, the files that I am parsing has following time stamp structure:
2009-03-08T00:27:31.807
those are miliseconds, just divide them by 1000, since gmtime expects seconds ...
time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(1236472051807/1000.0))