As far as I know, that is only guaranteed on Unix. On other platforms, time_t may not be castable to an integral type.