added time.h include for struct tm