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
  • Please note that this is not an official example from Nordic. It was a project used in a demo at some point, and uploaded to the Nordic Playground for convenience, in case anyone needed something similar. 

    The confusion regarding the month is just because you believe that the months go from 1 to 12, but they go from 0 to 11. As it says "months since january". Try inserting a date in december, and you should see that it is not possible to use month number 12.

    I do agree that it is a bit confusing, but when you enter the month 10 over UART, it is not october, it is november. If this confuses you, you need to either adjust how the time is printed (add 1 to the month) or change the way that the month is input (add one). 

Reply
  • Please note that this is not an official example from Nordic. It was a project used in a demo at some point, and uploaded to the Nordic Playground for convenience, in case anyone needed something similar. 

    The confusion regarding the month is just because you believe that the months go from 1 to 12, but they go from 0 to 11. As it says "months since january". Try inserting a date in december, and you should see that it is not possible to use month number 12.

    I do agree that it is a bit confusing, but when you enter the month 10 over UART, it is not october, it is november. If this confuses you, you need to either adjust how the time is printed (add 1 to the month) or change the way that the month is input (add one). 

Children
No Data
Related