time zone problems
Erez D
erez0001 at gmail.com
Sun Mar 29 11:20:55 IDT 2009
hi
erez at new53:~$ date
Sun Mar 29 11:14:50 IDT 2009
erez at new53:~$ date -d "GMT"
Sun Mar 29 03:00:00 IDT 2009
erez at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090329/3b661808/attachment.html>
More information about the Linux-il
mailing list