You may use rtc_get_time
function.
Here is the code to sample: https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/drivers/rtc/src/main.c
In general Zephyr needs a date-time source it fetches at startup to be able to provide absolute time. The realtive timestamp could be aquired by reading systicks for example.
Mor on time utilities could be found here: https://docs.zephyrproject.org/latest/kernel/timeutil.html#