<div dir="ltr">hi<br><br>erez@new53:~$ date<br>Sun Mar 29 11:14:50 IDT 2009<br>erez@new53:~$ date -d &quot;GMT&quot;<br>Sun Mar 29 03:00:00 IDT 2009<br>erez@new53:~$ date -d &quot;IDT&quot;<br>Sun Mar 29 00:00:00 IDT 2009<br>
<br>so i am 3 hours from GMT (as expected for israel daylight saving)<br><br><br>however:<br><br>struct tm time_str;<br>...<br>int d=timegm(&amp;time_str)-timelocal(&amp;time_str);<br>printf(&quot;%d\n&quot;,d);<br><br><br>
prints 7200 (which is 2*3600 -&gt; two hours).<br><br><br>any idea ?<br>or in in other words, how the f@#k i get the offset from GMT c-code ?<br><br><br>thanks,<br>erez.<br></div>