[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ITL - DST confusion



Thamer, I'm experiencing some confusion with regard to how my DST is
supposed to be handled (I'm getting the wrong values by 1 hour for my
calcs using ITL-lib and I'm guessing its due to the DST).  I believe
the code has been written with positive GMTdiff values in mind since
entering negative values results in an offset of +1 for me.  My DST
is being added in while I think it needs to be subtracted (maybe :-)

Keep in mind that DST is in effect from spring to fall through summer.

Here's a sample,

  -7 GMTdiff, no DST setting -> 13:55 Zuhr (since internally my PC
                                            is correctly set with 1 DST,
                                            I verified this via localtime
                                            struct access)
  -7 GMTdiff, 0 DST -> 12:55 Zuhr
  -7 GMTdiff, 1 DST -> 13:55 Zuhr

The right value from above should have been 12:55.  I don't know
how to explain it better but with my timezones and DST settings the
values are off by an hour (I've worked around 'em in the past with
simply planting the right numbers in the GMTdiff and dst, now I'm
wondering if other people's values are in fact correct irrespective
of DST setting).  I don't think its a matter of subtracting/adding
the DST per its sign as there is rounding-up that is being done, so
do please look into this bit if you can.  See if all combinations
work without issue for ya.

FYI, in my ~/.iprayrc I have,

  Latitude:         32.7157
  Longitude:      -117.1623
  UTC:		  -7
  AngleMethod:     1

Thanks & Salam.

 - Nadim