According to the mktime() manual page, a positive value of tm_isdst means that DST is in effect. However, mktime() seems to check only for tm_isdst==1, while any other positive value is treated as "no DST". Consider this program: int i; for (i = 1; i <= 2; ++i) { struct tm tm; memset(&tm,0,sizeof(tm)); tm.tm_mday = 1; tm.tm_mon = 10; tm.tm_year = 108; tm.tm_isdst = i; printf("isdst=%d",tm.tm_isdst); time_t t = mktime(&tm); printf(" --> mktime()=%d isdst=%d\n",t,tm.tm_isdst); } When running e.g. with TZ=Europe/Berlin, the output is isdst=1 --> mktime()=1225490400 isdst=0 isdst=2 --> mktime()=1225494000 isdst=0 Of course, the time in question is non-DST, and mktime correctly changes tm_isdst to 0. But IMHO there are two issues here: 1. The manpage should make clear wether or not the DST offset is applied in cases like this (take a look, for example, into the Solaris manpage) 2. All positive values of tm_isdst should produce the same result
I changed the libc code but the man pages are a completely separate project.