The length of 'long' in a 32-bit system is 32 bits, which cannot be used
to save timestamps after 2038. Most operating systems have extended
time_t to 64 bits.
Remove the castings to long.
Closes #7466
(void)gettimeofday(&now, NULL);
#else
else {
- now.tv_sec = (long)time(NULL);
+ now.tv_sec = time(NULL);
now.tv_usec = 0;
}
#endif
** time() returns the value of time in seconds since the Epoch.
*/
struct timeval now;
- now.tv_sec = (long)time(NULL);
+ now.tv_sec = time(NULL);
now.tv_usec = 0;
return now;
}
(void)gettimeofday(&now, NULL);
#else
else {
- now.tv_sec = (long)time(NULL);
+ now.tv_sec = time(NULL);
now.tv_usec = 0;
}
#endif
** time() returns the value of time in seconds since the Epoch.
*/
struct timeval now;
- now.tv_sec = (long)time(NULL);
+ now.tv_sec = time(NULL);
now.tv_usec = 0;
return now;
}
(void)gettimeofday(&now, NULL);
#else
else {
- now.tv_sec = (long)time(NULL);
+ now.tv_sec = time(NULL);
now.tv_usec = 0;
}
#endif
** time() returns the value of time in seconds since the Epoch.
*/
struct timeval now;
- now.tv_sec = (long)time(NULL);
+ now.tv_sec = time(NULL);
now.tv_usec = 0;
return now;
}