time zone problems

time zone problems

e2xbegqsdyt21hfc e2xbegqsdyt21hfc at yahoo.com
Sun Mar 29 15:24:12 IDT 2009


--- On Sun, 3/29/09, Erez D <erez0001 at gmail.com> wrote:

> i am 3 hours from GMT (as expected for israel daylight
> saving)
> 
> 
> however:
> 
> struct tm time_str;
> ...
> int d=timegm(&time_str)-timelocal(&time_str);
> printf("%d\n",d);
> 
> 
> 
> prints 7200 (which is 2*3600 -> two hours).
> 
> 
> any idea ?
> or in in other words, how the f@#k i get the offset from
> GMT c-code ?
> 


Doesn't stdc dated before DT was invented?
I can only suggest gnu/doc or googe for extensions or other libs. 


      



More information about the Linux-il mailing list