The memset(&now,0,sizeof(now)) is for a static analysis tool, as it didn't know if gmtime_r() would overwrite ALL of the &now object.