Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong UNIX time from rmw_uros_sync_session #130

Closed
ThorsAvenger opened this issue Mar 18, 2024 · 1 comment
Closed

Wrong UNIX time from rmw_uros_sync_session #130

ThorsAvenger opened this issue Mar 18, 2024 · 1 comment

Comments

@ThorsAvenger
Copy link

  • Hardware description: ESP32
  • RTOS: freeRTOS
  • Installation type: micro_ros_setup
  • Version or commit hash: humble

When I run this little snippet of code in my program

    RCSOFTCHECK(rmw_uros_sync_session(500));
    int32_t time = rmw_uros_epoch_millis()
    Serial.printf(" Time: %ld\n\r", time);

The result is something like this: Time: 1362526237, which would convert from UNIX time to timestamp GMT: Thursday 28 February 2013 11:40:49, which is about 11 years ago. Am I doing something wrong?

@ThorsAvenger
Copy link
Author

divide by 1000....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant