Description of problem: strptime sets tm_isdst incorrectly. Ths was first noticed because python (all versions) use glibc's strptime. Version-Release number of selected component (if applicable): glibc-2.2.5-43 through glibc-2.3.2-11.9 at least this corresponds to the versions on RHL 7.3 through RHL 9 How reproducible: Completely. See attached sample program. I recognize that it may depend on the locale and would be happy to provide whatever info you need. I'm just not sure at this point what that woud be. I'm in eastern time just like you, btw. Steps to Reproduce: 1. compile program using strptime 2. run it 3. look at results :) Actual results: in ALL of my tests (whether the string time was in DST or not) tm_isdst was set to 1108544020 Expected results: well, it should be -1, 0, or 1 according to /usr/include/time.h Additional info: attaching sample program
Created attachment 91009 [details] test program to demonstrate bug
From my reading of http://www.opengroup.org/onlinepubs/007908799/xsh/strptime.html it seems that strptime is required to only set the fields mentioned in the format (and recompute tm_wday and tm_yday if day/month/year changed) and the rest is unspecified whether it is preserved from previous content of the structure or newly set by strptime (and there is no way how can strptime guess this value even, there is no %Z format specifier for strptime).