Time of Day

Joel Sherrill joel.sherrill at OARcorp.com
Sun Aug 24 17:43:50 UTC 2008


Leon Pollak wrote:
> Hello.
>
> The c-users guide on page 66 states:
>
> ... rtems_clock_time_value;
> The seconds field in this structure is the number of seconds since the RTEMS
> epoch of January 1, 1988.
>
> But according to the calculation I did it seems to be from 1970.
>
> What is correct?
>
>   
The code.  This is supposed to be a way to get a POSIX style time from
the Classic API. I am applying this patch.

Index: user/clock.t
===================================================================
RCS file: /usr1/CVS/rtems/doc/user/clock.t,v
retrieving revision 1.23
diff -u -r1.23 clock.t
--- user/clock.t        15 Jul 2008 21:49:31 -0000      1.23
+++ user/clock.t        24 Aug 2008 17:42:56 -0000
@@ -112,8 +112,9 @@
 @end example
 @end ifset

-The seconds field in this @value{STRUCTURE} is the number of
-seconds since the RTEMS epoch of January 1, 1988.
+The seconds field in this @value{STRUCTURE} is the number of seconds
+since the POSIX epoch of January 1, 1970 but will never be prior to
+the RTEMS epoch of January 1, 1988.



> Thanks.
>
> --
> Leon
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list