Adding Time Offset in Swift
问题 I have a bunch of different show times in a database and want to display the correct time based on the users time zone by creating an offset. I'm getting the users time zone offset from GMT and converting that to hours first. NSTimeZone.localTimeZone().secondsFromGMT / 60 / 60 Then I need to find a way to add the hours to the date object.. that is where I/m struggling. let formatter = NSDateFormatter() formatter.dateFormat = "HH:mm" let date = formatter.dateFromString(timeAsString) println(