歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> Linux文化 >> 如何使用strftime()取得一定格式的時間值?

如何使用strftime()取得一定格式的時間值?

日期:2017/2/27 12:09:33   编辑:Linux文化

>>> 此貼的回復 >> 多用用man 手冊 man strftime 裡面說的很詳細了.

>>> 此貼的回復 >> time_t t1,t3; t3 = time(&t1); struct tm *t2; t2 = gmtime(&t1);

char buf3[13] = ""; strftime(buf3, sizeof(buf3),"%x",t2);


Copyright © Linux教程網 All Rights Reserved