ios - Is CMAccelerometerData event time stamp UTC value? -


in ios, i'm using event time stamp available event (cmaccelerometerdata*)
want know whether referencing year 2001 or 1970?
couldn't find proper document explains time stamp details.

the timestamp provided cmaccelerometerdata amount of time in seconds since phone booted.

so first have phone's boot time, this:

let boottime = nsdate(timeintervalsincenow: -nsprocessinfo.processinfo().systemuptime) 

and can real date accelerometer event:

let eventdate = nsdate(timeinterval: data.timestamp, sincedate: boottime) 

i see asked 25 days ago, hope still useful anyone.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -