How to calculate GMT Time based on Local time in C : <p>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. </p>

<p>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. </p>

<p>Now do we have any functions in standard C Library which will calculate the GMT Time for me when I pass the offset. </p>

<p>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: 
<a href="http://linux.die.net/man/3/localtime_r" rel="nofollow">http://linux.die.net/man/3/localtime_r</a>. I could not find any function which can calculate the time based on offset. </p>

<p>Is there any other approach to handle this. </p>
