c/c++ strptime() does not parse %Z Timezone name
问题 I am new to C. When I practicing C to covert time sting to structure tm back and forth. I noticed some difference. Please advice what I did wrong. #include <string.h> #include <stdio.h> #include <time.h> /* 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 tm)); if (strptime(date,"