nRF Cloud Log sends wrong timestamps with CONFIG_LOG_TIMESTAMP_USE_REALTIME=y

Hi!

I faced an issue with nRF Cloud Log. If I set CONFIG_LOG_TIMESTAMP_USE_REALTIME=y, I get wrong timestamps (2080 year..) in nRF Cloud Portal for all messages being logged.

I don't see any handling of CONFIG_LOG_TIMESTAMP_USE_REALTIME option in the nRF Cloud Log code. And it looks like it just handles both types of timestamps (uptime and realtime) the same way. So the resulting timestamp is "doubled" (1970 + 55 = 2025 year -> 2025 + 55 = 2080 year).

Or am I missing something or using this option in a wrong way?

My SDK version is 2.9.0.

My configuration contains:
CONFIG_LOG_TIMESTAMP_USE_REALTIME=y
CONFIG_NRF_CLOUD_LOG_BACKEND=y

This issue is currently not critical for our project.

Thank you!

Parents
  • Hi ragruslan,

    It seems you’ve encountered a bug with timestamp handling when using CONFIG_LOG_TIMESTAMP_USE_REALTIME in nRF Cloud Log. I agree that the module currently doesn’t distinguish between uptime and realtime timestamps, leading to the "double addition" issue you described (resulting in the year 2080).

    As a temporary workaround, you could try disabling CONFIG_LOG_TIMESTAMP_USE_REALTIME or report this issue to Nordic Semiconductor for a fix in future SDK grade calculator releases. If you need an immediate solution, manually converting timestamps before sending them to the cloud might help.

    Thanks for sharing this finding!

Reply
  • Hi ragruslan,

    It seems you’ve encountered a bug with timestamp handling when using CONFIG_LOG_TIMESTAMP_USE_REALTIME in nRF Cloud Log. I agree that the module currently doesn’t distinguish between uptime and realtime timestamps, leading to the "double addition" issue you described (resulting in the year 2080).

    As a temporary workaround, you could try disabling CONFIG_LOG_TIMESTAMP_USE_REALTIME or report this issue to Nordic Semiconductor for a fix in future SDK grade calculator releases. If you need an immediate solution, manually converting timestamps before sending them to the cloud might help.

    Thanks for sharing this finding!

Children
No Data
Related