I have a DateFormatter and I am passing a String of date to it with an intent to transform to date. The problem is that this final date is always coming with 3 hours more. This is my code:
let taskDateFormatter = DateFormatter()
taskDateFormatter.locale = Locale.current
taskDateFormatter.dateFormat = "dd/MM/yyyy HH:mm:ss"
print(task!.logData!)// this print 016/06/2017 10:25:12
let date = taskDateFormatter.date(from: task!.logData!)
print(date!)// this print 2017-06-16 13:25:12 +0000
What am I doing wrong?