I want to get current time according to my iPhone device I am using code which is giving me yesterday time. My code is
let calendar = Calendar.current
let dateStart = calendar.startOfDay(for: Date())
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "hh:mm a"
dateFormatter.timeZone = TimeZone.current
let strDate = Date().description(with: Locale.current) //dateFormatter.string(from: dateStart)
print("date Start ***** (dateStart)")
By this I am getting a response :
date Start ***** 2018-02-14 18:30:00 +0000
Can anyone help me how can I get correct time today is 15-02-2018 18:00
Thanks