How do i get local time?

I have been using le_pos_GetTime(&hours, &minutes, &seconds, &milliseconds); to get time. But the output time it is providing is in UTC +0. My time zone is UTC-4. How can I get my current local time?

You can type “date” to get local time.

Also you can have a look on this api

RTC is still giving UTC +0. Is there any way to set it to EST?

Does this help?

He suggests a link:

Here is an update:
I followed this documentation: https://docs.legato.io/15_10/tools_host_settz.html

After that I tried “date” which which showed local time but still the functions I am using in my code are giving UTC +0 time;

then why don’t use the “date” related API in your code?