Do Bluetooth development time to set the synchronization time, in seconds, the current time distance from 2000-01-01 00:00:00 seconds. Search the Internet for a long time of the data have not found the right, and then studied a bit. The specific wording is as follows:
NSDateFormatter *dateformatter = [[NSDateFormatter alloc] init];
[Dateformatter setdateformat:@ "Yyyy-mm-dd HH:mm:ss"]; Set the time format
Nstimezone *timezone = [Nstimezone timezonewithname:@ "GMT"];
[Dateformatter Settimezone:timezone]; Set the time zone
NSString *somedaystr= @ "2000-01-01 00:00:00"; Set a point in the past for example: 2000-01-01 00:00:00
NSDate *somedaydate = [Dateformatter datefromstring:somedaystr];
NSDate *currentdate = [NSDate Date];
Nstimeinterval Time=[currentdate Timeintervalsincedate:somedaydate]; Number of seconds 00:00:00 current time distance 2000-01-01
NSLog (@ "%lld", (Long long int) time);
The number of seconds that the IOS current time is past a certain point in time