Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Problem with nrf5_calendar example

Dear,

I have integrated the nrf5_calendar example with "usbd_ble_uart" . Everything works correctly, but I have detected two possible errors (or I am doing something wrong):

ERROR 1: problem with the configured year. I can solve this by changing 1900 to 2000, but I don't know if it will affect another time.

ERROR 2: The function "nrf_cal_get_time_string" adds +1 to the configured month value (I have tried with different configurations and it always happens).

Notes:

SDK: nRF5_SDK_17.1.0_ddde560

EVB: nRF52833 DK

Any ideas?

Thank you very much for your help.

Raquel.

Parents
  • So the month setting has to be taking into account January = 0 and December = 11, however, the function nrf_cal_get_time_string(false) does return the correct value (January = 1, December = 12).
    My tests make me think that this is the case. Can you confirm this?

    TEST:

    I want to set mm/dd/yyyy = 12/12/2022 and hh:mm:ss = 23:59:55. Taking into account that month = 0 means January and month = 11 means December, I configure by USB the following:

    [INFO]: 11/12/2022, 23:59:55

    After 5 seconds the day, month and year must be changed.  You can see that January is shown as 01 (and not as 00):

    Thank you.

Reply
  • So the month setting has to be taking into account January = 0 and December = 11, however, the function nrf_cal_get_time_string(false) does return the correct value (January = 1, December = 12).
    My tests make me think that this is the case. Can you confirm this?

    TEST:

    I want to set mm/dd/yyyy = 12/12/2022 and hh:mm:ss = 23:59:55. Taking into account that month = 0 means January and month = 11 means December, I configure by USB the following:

    [INFO]: 11/12/2022, 23:59:55

    After 5 seconds the day, month and year must be changed.  You can see that January is shown as 01 (and not as 00):

    Thank you.

Children
No Data
Related