On 04 Aug 2002 19:36:12 +0300, Erez Doron <[EMAIL PROTECTED]> wrote:
>
> thanks for the code. is it GPL'D ? (may i use it).
> anyway, python's time.timezone returns -7200 while this code returns
> +10800 ( -2 hours relative to +3 hours )
>
> why is that ?
That's because my code take the DST (daylight saving time) into the
offset automatically (I commented about it in my original post).
> On Sun, 2002-08-04 at 19:20, Ehud Karni wrote:
> > On 04 Aug 2002 18:54:44 +0300, Erez Doron <[EMAIL PROTECTED]> wrote:
> > >
> > > i am writing a small app in C and i need to get the timezone
> > > ( e.g. -2:00 for israel )
> > > how do i do that ?
> > >
> > > the timezone variable from <time.h> returns 0
> >
> > Bellow is my function for getting the offset (It should work on any
> > system, even M$Windoze). It is better than checking TZ because it
> > will have the DST included automatically.
^^^^^^^^^^^^^^^^^^^^^^^^^^
Ehud.
--
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
mailto:[EMAIL PROTECTED] Better Safe Than Sorry
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]