Fix type errors in daylog.c format strings, and use time_t instead of long.