Gedare Bloom started a new discussion on cpukit/rtems/src/clockgettod.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/339#note_119464 > - year_days += 1; > - } > - } > + struct tm buf; > + struct tm *current_time_tm; > + current_time_tm = gmtime_r( &now.tv_sec, &buf ); > > - time_of_day->year = year; > - time_of_day->month = _Year_day_as_month( year, &year_days ) + 1; > - time_of_day->day = year_days + 1; > - time_of_day->hour = day_secs / RTEMS_SECS_PER_HOUR; > - time_of_day->minute = day_secs % RTEMS_SECS_PER_HOUR; > - time_of_day->second = time_of_day->minute % RTEMS_SECS_PER_MINUTE; > - time_of_day->minute = time_of_day->minute / RTEMS_SECS_PER_MINUTE; > + time_of_day->year = 1900 + current_time_tm->tm_year; > + time_of_day->month = 1 + current_time_tm->tm_mon; Do we still need the `1 +` here? -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/339#note_119464 You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
