????????????
????????????????????? 1970 ??1??1???00:00:00 ?????????????????????
????#include
????#include int main(int argc?? const char * argv[])
????{
????time_t t;
????struct tm *p;
????t=1408413451;
????p=gmtime(&t);
????char s[80];
????strftime(s?? 80?? "%Y-%m-%d %H:%M:%S"?? p);
????printf("%d: %sn"?? (int)t?? s);
????}
???????
????1408413451      2014-08-19 01:57:1408384651
??????????????????linux????????????
????[###t]$ date -d @1408413451
????Tue Aug 19 09:57:31 <strong>CST</strong> 2014
?????????????????????ò?8??С???CST?????????????????strftime????????????????????????????
????#include
????#include int main(int argc?? const char * argv[])
????{
????time_t t;
????struct tm *p;
????t=1408413451;
????p=gmtime(&t);
????char s[80];
????strftime(s?? 80?? "%Y-%m-%d %H:%M:%S::%Z"?? p);
????printf("%d: %sn"?? (int)t?? s);
????}
???????
????1408413451: 2014-08-19 01:57:31::<strong>GMT
????</strong>
??????
????GMT(Greenwich Mean Time)??????????α????????????????????λ???????????????????????????????????1675????????????????????????????ε????????????????????????????????????????????????????24С?????????????μ????????????????????趨??????????????ο??????????????ε?????????????趨???????????????????????????α?????(Greenwich Mean Time?????G.M.T.)????????
????CST?????????????? 4 ????????????
????Central Standard Time (USA) UT-6:00
????Central Standard Time (Australia) UT+9:30
????China Standard Time UT+8:00
????Cuba Standard Time UT-4:00
?????????CST????????????????????????й????????????????
?????????????8??С???CST??GMT??/??8??С?????GMT+8*3600=CST??????????
????#include
????#include int main(int argc?? const char * argv[])
????{
????time_t t;
????struct tm *p;
????t=1408413451;
????p=gmtime(&t);
????char s[80];
????strftime(s?? 80?? "%Y-%m-%d %H:%M:%S::%Z"?? p);
????printf("%d: %sn"?? (int)t?? s);
????t=1408413451 + 28800;
????p=gmtime(&t);
????strftime(s?? 80?? "%Y-%m-%d %H:%M:%S"?? p);
????printf("%d: %sn"?? (int)t?? s);
????return 0;
????}
???????
????1408413451: 2014-08-19 01:57:31::GMT
????1408442251: 2014-08-19 09:57:31
????linux??
????Tue Aug 19 09:57:31 CST 2014