Please refer attached sample image in datepicker
.
I already changed to today 2 26 PM
but you can notice debug mode still show 1 hour later than what I chose
2018-01-22 03:26:10 +0000
Any idea what it is?
Please refer attached sample image in datepicker
.
I already changed to today 2 26 PM
but you can notice debug mode still show 1 hour later than what I chose
2018-01-22 03:26:10 +0000
Any idea what it is?
You have to set the TimeZone
for your DateFormatter
like this.
let dateFormatter = DateFormatter()
dateFormatter.timeZone = TimeZone(abbreviation: "GMT")// Set your time time zone here
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
dateFormatter.locale = NSLocale.current