the puzzle of timer

in my project,I want to change the time value from type “struct tm” to type “time_t” and later reverse the change(from "time_t "to “struct tm”),
in QNX I write the code below:
struct tm t;
time_t t1;
and later I use
struct tm* t2=gmtime(&t1);
I found t2->tm_hour is 11, not 3, other value is correct,
anyone can tell me the reason,thank you!

Set your RTC to GMT rather than local time.

And tick the timezone panel option “The hardware clock uses GMT”, in the qnx localisation options.

Can you tell me use which function to set my RTC to GMT?

That’s it. That and set the time. You can double check it by rebooting and popping into the bios menus. The bios time should read same as GMT.

But I need to change it in programme,not by manual work.