I have this time format 2016-09-06T12:44:00.118Z
What is the correct format for NSDateformatter? With below format it doesn't seems to be calculating the correct time.
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
Try this...
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
dateFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX")
dateFormatter.timeZone = NSTimeZone(name: "UTC")