hi

e...@new53:~$ date
Sun Mar 29 11:14:50 IDT 2009
e...@new53:~$ date -d "GMT"
Sun Mar 29 03:00:00 IDT 2009
e...@new53:~$ date -d "IDT"
Sun Mar 29 00:00:00 IDT 2009

so 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 ?


thanks,
erez.
_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to