zoukankan      html  css  js  c++  java
  • PHP 时间戳 转时间 for ios 8*3600

    // 时间戳 转时间

            

          

            int intTimeString = [_model.date intValue];

            NSDate *confromTimesp = [NSDate dateWithTimeIntervalSince1970:intTimeString];

            NSLog(@"confromTimesp %@", confromTimesp);

            NSDateFormatter *formatter = [[NSDateFormatter alloc] init];

            NSTimeZone * timeZone = [NSTimeZone timeZoneForSecondsFromGMT:8*3600];

            [formatter setTimeZone:timeZone];

            [formatter setDateStyle:NSDateFormatterMediumStyle];

            [formatter setTimeStyle:NSDateFormatterShortStyle];

            [formatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"];

            NSString  * formatedTime = [formatter stringFromDate:confromTimesp];

            NSLog(@"formatedTime is %@",formatedTime);

            _SendTimeLabel.text = formatedTime;

            

  • 相关阅读:
    STL之vector
    STL之string
    STL之map
    STL之queue
    STL之set
    Ubuntu 12.04 输入法托盘图标消失
    Hibernate:No row with the given identifier exists
    Java 数组
    Oracle 简单备份 批处理(BAT)
    Oracle DataBase Link
  • 原文地址:https://www.cnblogs.com/tangyuanby2/p/6762231.html
Copyright © 2011-2022 走看看