Change GMT offset
George Krietsepis
Posts: 284
Dear All,
although I have read many topics about this, I have not come to a clear conclusion . I'm using the ASTRO_CLOCK to keep the sunrise/sunset times, but I need to manually change the GMT offset parameter from the code every 6 months for the sunrise/sunset values to be synchronized .
In my case the astro_clock(22.572563, 40.282520, 2.0, LDATE, sSunRise, sSunSet) works for summer time while the astro_clock(22.572563, 40.282520, 3.0, LDATE, sSunRise, sSunSet) for winter time. If I don't change the GMT offset ( from 2 to 3 and vice versa) , the sunrise/sunset values will be an hour onward or backward for 6 months period.
My question :
How can I get from code when daylight saving and standard time change ? If I have this information, I can make some piece of code to change the GMT offset value and pass it into the ASTRO_CLOCK function, without the need to be manually changed by me every 6 months.
For example :
if ( date = x )
nGMT = 2 //daylight_saving_time
if ( date = y )
nGMT = 3 //standard_time
astro_clock(22.572563, 40.282520,nGMT, LDATE, sSunRise, sSunSet)
Thanks,
George
although I have read many topics about this, I have not come to a clear conclusion . I'm using the ASTRO_CLOCK to keep the sunrise/sunset times, but I need to manually change the GMT offset parameter from the code every 6 months for the sunrise/sunset values to be synchronized .
In my case the astro_clock(22.572563, 40.282520, 2.0, LDATE, sSunRise, sSunSet) works for summer time while the astro_clock(22.572563, 40.282520, 3.0, LDATE, sSunRise, sSunSet) for winter time. If I don't change the GMT offset ( from 2 to 3 and vice versa) , the sunrise/sunset values will be an hour onward or backward for 6 months period.
My question :
How can I get from code when daylight saving and standard time change ? If I have this information, I can make some piece of code to change the GMT offset value and pass it into the ASTRO_CLOCK function, without the need to be manually changed by me every 6 months.
For example :
if ( date = x )
nGMT = 2 //daylight_saving_time
if ( date = y )
nGMT = 3 //standard_time
astro_clock(22.572563, 40.282520,nGMT, LDATE, sSunRise, sSunSet)
Thanks,
George
0
Comments