fix 64bit issue with time_t from database