#include <stdio.h>
#include <time.h>
#define BST (+1)
#define CCT (+8)
int main () {
time_t rawtime;
struct tm *info;
time(&rawtime);
/* Get GMT time */
info = gmtime(&rawtime );
printf("Current world clock:/n");
printf("London : %2d:%02d/n", (info->tm_hour+BST)%24, info->tm_min);
printf("China : %2d:%02d/n", (info->tm_hour+CCT)%24, info->tm_min);
return(0);
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265289.html