C语言基础:timezone时区显示
#include <stdio.h> #include <time.h> int main(void) { tzset(); printf("Difference between local and GMT is %d hours\n", timezone / 3600); return 1; }
输出结果
Difference between local and GMT is -8 hours
C语言基础:timezone时区显示
#include <stdio.h> #include <time.h> int main(void) { tzset(); printf("Difference between local and GMT is %d hours\n", timezone / 3600); return 1; }
输出结果
Difference between local and GMT is -8 hours