ios 时间戳

NSDate *datenow = [NSDate date];

    NSTimeZone *zone = [NSTimeZone systemTimeZone];

    NSInteger interval = [zone secondsFromGMTForDate:datenow];

    NSDate *localeDate = [datenow  dateByAddingTimeInterval: interval];

   NSString *timeTamp=[NSString stringWithFormat:@"%ld",(long)[localeDate timeIntervalSince1970]]

posted on 2015-02-10 20:33  MGY007  阅读(141)  评论(0编辑  收藏  举报