gmtimer: Fixed range of tm_yday.

This commit is contained in:
Fotis Panagiotopoulos
2022-10-18 16:51:02 +03:00
committed by Xiang Xiao
parent 55106685fa
commit f9fd53cda1
8 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -334,7 +334,7 @@ FAR struct tm *gmtime_r(FAR const time_t *timep, FAR struct tm *result)
result->tm_sec = (int)sec;
result->tm_wday = clock_dayoftheweek(day, month, year);
result->tm_yday = day +
result->tm_yday = day - 1 +
clock_daysbeforemonth(result->tm_mon,
clock_isleapyear(year));
result->tm_isdst = 0;