title: iOS Core Motion how to convert timestamp to Date?
body: <p>I'm examining CMRecordedAccelerometerData and it has a timestamp, defined as:</p>
  
  <blockquote>
    <p>The timestamp is the amount of time in seconds since the device
    booted.</p>
  </blockquote>
  
  <p><strong>How do I convert timestamp from device last boot to NSDate?</strong></p>
  
  <p>For example, the system provides a CMRecordedAccelerometerData object with a timestamp value of: 1030958.895134</p>
  
  <p>If I use any of the available reference frames (1970, reference date), I will get a wrong date, not in 2019. I want the real date when the event was recorded.</p>
  
  <p><a href="https://i.stack.imgur.com/fch3x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fch3x.png" alt="enter image description here"></a> </p>