iphone - mktime(从 php)到 iphone 时间(字符串)

标签 iphone ios ipad nsdate mktime

我有来自 PHP 函数 mktime(纪元时间)的变量值,确切地说是 133123088。 我如何才能在 iphone 中将其更改为可读日期?

是否有任何函数可以将这种格式转换为另一种格式,如 NSDate 或只是字符串?

最佳答案

NSDate* 日期 = [NSDate dateWithTimeIntervalSince1970: 133123088]

关于iphone - mktime(从 php)到 iphone 时间(字符串),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9616754/

相关文章:

iphone - 默认的 UITableView 分隔符的 UIColor 是什么?

iphone - 使用核心数据重新排列 UITableView

iphone - UIImage 到 BitmapContext

iphone - 我可以自定义 UIDatePicker 吗?

iphone - Xcode 错误 : Incompatible Objective-C types. 预期为 'struct UIView'

iphone - 将位置数据保存到 Core Data

iphone - 记录电话对话 - ios

ios - 当用户向下滚动时, Material float 操作按钮应不可见,向上滚动时应可见

ios - 在后台关闭模态视图 Controller

iphone - NSZombieEnabled 防止我的​​应用程序崩溃