mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Use correct day of year in correct_tm()
Set the correct day of year value in correct_tm() when the system's localtime(_r) or gmtime(_r) functions fail to set struct tm. Fixes bug 13476.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
o Minor bugfixes:
|
||||
- Set the correct day of year value when the system's localtime(_r)
|
||||
or gmtime(_r) functions fail to set struct tm.
|
||||
Fixes bug 13476.
|
||||
+3
-3
@@ -2774,7 +2774,7 @@ correct_tm(int islocal, const time_t *timep, struct tm *resultbuf,
|
||||
r->tm_year = 8099;
|
||||
r->tm_mon = 11;
|
||||
r->tm_mday = 31;
|
||||
r->tm_yday = 365;
|
||||
r->tm_yday = 364;
|
||||
r->tm_hour = 23;
|
||||
r->tm_min = 59;
|
||||
r->tm_sec = 59;
|
||||
@@ -2791,7 +2791,7 @@ correct_tm(int islocal, const time_t *timep, struct tm *resultbuf,
|
||||
r->tm_year = 70; /* 1970 CE */
|
||||
r->tm_mon = 0;
|
||||
r->tm_mday = 1;
|
||||
r->tm_yday = 1;
|
||||
r->tm_yday = 0;
|
||||
r->tm_hour = 0;
|
||||
r->tm_min = 0 ;
|
||||
r->tm_sec = 0;
|
||||
@@ -2804,7 +2804,7 @@ correct_tm(int islocal, const time_t *timep, struct tm *resultbuf,
|
||||
r->tm_year = 137; /* 2037 CE */
|
||||
r->tm_mon = 11;
|
||||
r->tm_mday = 31;
|
||||
r->tm_yday = 365;
|
||||
r->tm_yday = 364;
|
||||
r->tm_hour = 23;
|
||||
r->tm_min = 59;
|
||||
r->tm_sec = 59;
|
||||
|
||||
Reference in New Issue
Block a user