Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions

i!Schedule modify

Hi everyone,
I live in Athens,Greece and I try to modify the i!Schedule program for having the right sunrise and sunset times but something is going wrong (1 hour after the right times). Our co-ordinates are 23.43 Longtitude and 37.58 Latitude. Our time zone is +2.00GMT. Could you suggest me the values for these settings ?

George

Comments

  • Hi George!

    Did you consider the daylight saving time?

    Oliver
  • Hi Oliver,

    Below you can see the settings for the daylight saving time that I have used

    strTmTzDstRules = "'Mar LastSun 03:00:00 01:00:00 D',$FF,'Oct LastSun 03:00:00 01:00:00 S'"

    George
  • Hi,
    here is the rule for Germany:
    strTmTzDstRules = "'Mar LastSun 02:00:00 01:00:00 MESZ',$FF,'Oct LastSun 03:00:00 00:00:00 MEZ'"
    

    I think this should be valid for Greece also.
    The rule means that
    - from Last Sunday in March at 2am the offset to normal time is +1 hour and
    - from Last Sunday in October at 3am the offset goes back to +0 hours.

    In your rule you always have an offset of +1 hour!!!
    I guess that is the problem with your rule.

    Regards, Harald
  • Hi Harald,

    George?s time zone is correct. The time zone for Greece is GMT+2 (as he wrote).
    He has to get up one hour earlier than we in Germany... :D
    Time zones of Europe: http://www.entdeckeeuropa.de/eu/zeitzonen.gif

    I?m just a beginner in programming AMX so I can?t help much about the code...

    Regards
    Oliver
  • maxifoxmaxifox Posts: 209
    George,

    Try what we use for Cyprus (that' for TimeManager but it is applied to Schedule as well I guess):

    // i!-TimeManager: Configure Timezone
    DOUBLE dTmTzGmtOffset = 2.0;

    // i!-TimeManager: Configure Timezone
    // (GMT offset defined in dTmTzGmtOffset is counted!)
    strTmTzDstRules = "'Oct LastSun 01:00:00 00:00:00 EET',$FF,'Mar LastSun 01:00:00 01:00:00 EEST'";

    Hope this helps.
  • Hi Maxim,
    I used the settings that you have sent me but I have the same problem. The sunrise and sunset times are an hour after the right ones. This is very strange. Isn't it?
  • maxifoxmaxifox Posts: 209
    George,

    As I understood you have problem with sunrise/sunset calculations only.
    The time itself is correct, isn't?

    Looks like daylight saving is the issue. Usually sunset/sunrise astronomical algorithms use standard time. If we pass there daylight saving time as standard and then again convert it to daylight we get additional one hour ahead. In other words, I suspect there is a bug in the module.

    Unfortunately it not possible (to my knowledge) to debug AMX iSchedule module. I would suggest two options:

    1. Use standard Netlinx routine ASTRO_CLOCK to get sunrise/sunset.
    2. Use TimeSync package from Jeffaco (http://sourceforge.net/projects/netlinx-modules/). it is an open-source module with solid debugging. Indeed AMX used his module to produce i-TimeManager...

    P.S. The Daylight rule string I provided is not yet correct.
    It should be strTmTzDstRules = "'Oct LastSun 04:00:00 00:00:00 EET',$FF,'Mar LastSun 03:00:00 01:00:00 EEST'";
Sign In or Register to comment.