[BACKPORT 4.14.y 5/8] rtc: Fix overflow when converting time64_t to rtc_time