Convert rtems_clock_time_value to UTC (ascii)
Ian Caddy
ianc at goanna.iinet.net.au
Tue Jul 26 01:42:13 UTC 2005
Hi Rolf,
We have this problem as some of our older systems use psos as the OS, so
we have a conversion utility that converts between RTEMS time and
standard unix time. The definition we use is:
#define DELTA_1988_1970_SECS
(((1988L-1970L)*365L+(1988L-1970L)/4L)*24L*60L*60L)
I hope this helps.
regards,
Ian Caddy
Rolf Schroedter wrote:
> My measurement data has an RTEMS timestamp in seconds,microseconds
> (rtems_clock_time_value). How can I convert this value later to
> human-readable UTC.
> Obviously gmtime() cannot be used, because the RTEMS value has an offset
> to UNIX-style time_t.
>
> Is there a constant #define'ed, which should be added to get a UNIX
> time_t ?
>
> Thanks & regards,
> ROLF.
>
> ------------------------------------
> Rolf Schroedter
> German Aerospace Center
> Institute of Planetary Research
> D-12489 Berlin, Rutherfordstrasse 2
> Tel/Fax: (+49) (30) 67055-416/384
> Email: Rolf.Schroedter at dlr.de
>
>
--
Ian Caddy
Goanna Technologies Pty Ltd
+61 8 9221 1860
More information about the users
mailing list