Tag: timestamp with timezone

c / c ++ strptime()不解析%Z时区名称

我是C的新手。当我练习C来隐蔽时间来刺激来回构造时。 我发现有些不同。 请告诉我做错了什么。 #include #include #include /* test different format string to strptime ” %A, %b %d, %X %z %Y ” ” %A, %b %d, %X %Z %Y ” */ int main(int argc,char *argv[]) { char date[] = “6 Mar 2001 12:33:45”; char fmt[80]; struct tm tm; if (argc==1) return 0; strcpy(fmt,argv[1]); memset(&tm, 0, sizeof(struct […]