how to add time in current time

后端 未结 4 2034
梦如初夏
梦如初夏 2021-02-14 07:14

I\'m quite confused about this one.

I want to grab, current time, than according to condition, I want to add the required time, to the current time. for example.

4条回答
  •  醉梦人生
    2021-02-14 07:47

    'addTimeInterval:' is deprecated
    

    You can use this now

    mydate=[NSDate date];    
    mydate = [mydate dateByAddingTimeInterval:XXX]; //XXX in seconds
    

提交回复
热议问题