mirror of
https://github.com/curl/curl.git
synced 2026-08-25 19:23:32 +03:00
mktime() returns a time_t. time_t is often 32 bits, even on many architectures
that feature 64 bit 'long'. Some systems have 64 bit time_t and deal with years beyond 2038. However, even some of the systems with 64 bit time_t returns -1 for dates beyond 03:14:07 UTC, January 19, 2038. (Such as AIX 5100-06)
This commit is contained in:
parent
5cd9f57137
commit
8a96aec567
2 changed files with 14 additions and 2 deletions
|
|
@ -369,10 +369,17 @@ static time_t Curl_parsedate(const char *date)
|
|||
tm.tm_yday = 0;
|
||||
tm.tm_isdst = 0;
|
||||
|
||||
/* mktime() returns a time_t. time_t is often 32 bits, even on many
|
||||
architectures that feature 64 bit 'long'.
|
||||
|
||||
Some systems have 64 bit time_t and deal with years beyond 2038. However,
|
||||
even some of the systems with 64 bit time_t returns -1 for dates beyond
|
||||
03:14:07 UTC, January 19, 2038. (Such as AIX 5100-06)
|
||||
*/
|
||||
t = mktime(&tm);
|
||||
|
||||
/* time zone adjust */
|
||||
{
|
||||
if(-1 != t) {
|
||||
struct tm *gmt;
|
||||
long delta;
|
||||
time_t t2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue