I have a linx based system where we cannot specify timezone of the time being set. So whoever sets time on this device sets their localtime. Now I have a requirement where I need to calculate the GMT Time based on the localtime that was existing on the device.
I guess I need to be taking the input of timezone the user is located in some variable. For Example timezone = EST-5:00EDT which means the local time is 5 hours behind the GMT Time.
Now do we have any functions in standard C Library which will calculate the GMT Time for me when I pass the offset.
Any help in this regard is highly appreciated. I searched through web and all I could find is only these functions in the below link: http://linux.die.net/man/3/localtime_r. I could not find any function which can calculate the time based on offset.
Is there any other approach to handle this.