2011-05-01 40 views

回答

4

1303826968是自1月1日的秒數,1970年

NSDate *d = [[NSDate alloc] initWithTimeIntervalSince1970:1303826968]; 
NSLog(@"Date: %@", d); 
// Will output: 2011-04-26 14:09:28 +0000 
2

您可以在SQLite的提示Unix紀元時間戳轉換爲本地時間,太。

sqlite> select datetime(1303826968, 'unixepoch', 'localtime'); 
2011-04-26 10:09:28 

搜索字符串「unix」的Date and Time functions