I need to encode the time stamp in my url from 03-28-2017 11:00:05 +0000 to this format 01-01-1970%2000%3A00%3A00%20%2B0530.
I am using this code:
updateCheckUrl = updateCheckUrl.addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlQueryAllowed)
But the result is not as expected its just adding %20 in the spaces. How can i get the desired encoding using swift 3.1.
queryAllowedand remove&=+.