Fixes for gcc and linux. Use strftime instead of put_time. Initialize structure variables.