怎样将系统的时间类型转换GMT时间字符串?以及GMT转换成时间类型!
请给出具体程序。
[解决办法]
#include <time.h>#include <stdio.h>void main(){ struct tm xmas = { 0, 0, 8, 1, 1, 112 }; // 01-Feb-2003 08:00:00 GTM 开始 time_t start = mktime( &xmas ) ; printf("UTC:%d\n",start); time_t ltime ; time(<ime); printf( "time and date:\t %s\n", ctime( <ime ) ); }