Question on rtems epoch time

Joel Sherrill joel at rtems.org
Sat Apr 24 17:35:52 UTC 2021


On Sat, Apr 24, 2021, 4:26 AM <wangqiang3 at sugon.com> wrote:

> Hi:
>
> I have a question is that why rtems's epoch base year is 1988(#define
> TOD_BASE_YEAR 1988)?
> I change TOD_BASE_YEAR to 1970 and TOD_SECONDS_1970_THROUGH_1988 to 0,such
> as:
>
>
> It work well. So I wonder is that a good method?


RTEMS development started in 1988 and it was for the Classic API only.
Using 1988 as the base year gave us a leap year as epoch and dividing by
four worked for a long time to determine leap years.

Over the years, the score has moved to POSIX time and the 1988 restriction
could be enforced not at the score level but at the classic level.

>
>
>
>
> Thanks! _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20210424/49470abb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noname
Type: image/gif
Size: 35006 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20210424/49470abb/attachment-0003.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noname
Type: image/gif
Size: 11470 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20210424/49470abb/attachment-0004.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noname
Type: image/gif
Size: 35006 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20210424/49470abb/attachment-0005.gif>


More information about the users mailing list