Skip to content

CFE_TIME_GetTime() information seems incorrect? #53

@SweeWarman

Description

@SweeWarman

A question related to the use of the time service provided by cfe.

I am trying to get time information using the API provided by cfe as follows:

CFE_TIME_SysTime_t time;
time = CFE_TIME_GetTime();

And I print it as follows:

char buffer[500] = {0};
CFE_TIME_Print(buffer,time);
OS_printf("%s\n",buffer);

But the printed year and time information seems to be incorrect. It indicates some value in 1980 as: 1980-012-14:03:20.00000. Also, when I launch cfe (core-cpu1), I see the following output which indicates the time starting in 2030 and then changing to some value in 1980.

2030-069-17:55:07.13648 SB internal message format: CCSDS Space Packet Protocol version 1
2030-069-17:55:07.13649 ES Startup: Calling CFE_TIME_EarlyInit
1980-012-14:03:20.00000 ES Startup: Calling CFE_TBL_EarlyInit
1980-012-14:03:20.00021 ES Startup: Calling CFE_FS_EarlyInit

Could someone please explain how I could obtain the correct current time information using the cFE APIs without having to resort to using functions in time.h?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions