Check out example codes for "convert secondsfrom1970 to date swift". It will help you in understanding the concepts better.

Code Example 1

let date = NSDate() // current date
let unixtime = date.timeIntervalSince1970

Code Example 2

let epochTime = TimeInterval(1429162809359) / 1000
let date = Date(timeIntervalSince1970: epochTime)   // "Apr 16, 2015, 2:40 AM"

print("Converted Time \(date)")         // "Converted Time 2015-04-16 05:40:09 +0000\n"

Code Example 3

var epocTime = NSTimeInterval(1429162809359)

let myDate = NSDate(timeIntervalSince1970: epocTime)
println("Converted Time \(myDate)")

Learn ReactJs, React Native from akashmittal.com