JOB SCHEDULER - DST (Daylight Saving Time) - Legal Time

andy76andy76 Member Posts: 616
Hello everybody,

I could set some server for different customers to execute some report and
codeunit different and it runs right.

The problem that I found in these days is that having changed the hour from
2:00 a.m. to 3:00 a.m in the night between 29 and 30 March all my scheduled
activities have been delayed of an hour.
Now I resetted them (in job queue entry card) and restarted the application
server and it seems to go at the right time but the problem can happen again
every 5-6 months when the time is changed.
Is it possible to solve this problem? How?

Thank you very much

Comments

  • andy76andy76 Member Posts: 616
    Further details

    NAV 5.0 [CH] Swiss
    DB : SQL Server 2005
    OS : Windows 2003 Server

    for both customers

    Thank you again
  • kinekine Member Posts: 12,562
    To prevent that is better to not use DateTime data type but Date and Time in two fields. In this case you will not Time shift each half a year.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • andy76andy76 Member Posts: 616
    Hello,

    thank you for your reply.
    But I'm using the standard field of NAV 5.0...regarding Job Scheduler table.. do I have to modify them and also the codeunit?

    Have Microsoft/Navision developer foreseen this thing?
  • kinekine Member Posts: 12,562
    The automatic "timezone" implementation in NAV has this side effect. If you need to change that, you need to correct the process somehow but problem is how to "detect" the daylight saving change (do not forget that US has another dates of "daylight saving" changes).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ara3nara3n Member Posts: 9,256
    I would schedule to restart Nas on those dates.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kinekine Member Posts: 12,562
    ara3n wrote:
    I would schedule to restart Nas on those dates.

    It will not solve the problem. Problem is, that if the Machine timezone is changed (and it is when going to Daylight saving...) all the predefined start times are shifted by one hour. You need to "redefine" the time each 6 months to start the jobs in same "day time". For me the timezone shifting done in NAV is not good. The time must be still same if I am still in same timezone, regardless I am in daylight saving right now or not. Because e.g. if I am waking up in 6:00 CET in winter, I want to wake up in 6:00 CET in summer too... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ara3nara3n Member Posts: 9,256
    You could create a job that would run every six months and change all the setups?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • andy76andy76 Member Posts: 616
    But Microsoft will not correct this thing?
    It is normal that a scheduled job runs everyday of the year and can have these problems....
  • kinekine Member Posts: 12,562
    To "correct" something you need the bug first... but this is not a bug from one side and it is a bug from another side... it can be discussed...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • andy76andy76 Member Posts: 616
    Hello,

    this problem has rehappened now, we have discovered that only today (after 5 days of time changing).
    Somebody has some valid suggestion?

    Thank you very much
  • DenSterDenSter Member Posts: 8,304
    You can turn off automatic daylight savings time adjustments on the machine that runs the Job Scheduler. That way your job should run at the regular time, but you will need to manually change the time on the machine.
  • jlandeenjlandeen Member Posts: 524
    I think even that has a problem.

    Date times are stored in Coordinated Universal Time (UTC or GMT, Zulu time). Which means that the translation occurs at the time you enter in the data. As UTC time is contstant and doesn't change based on Daylight Savings Time.

    Example: I'm in Toronto, I am currently in Daylight Savings time (DST) - if I set the daily time for a Job to run as of now it would run at 10:57am every day. This is stored as 14:57 UTC (or 2:57pm on the same day). Now when my local time zone comes off DST on the machine running the job via NAS should try to run at 14:57 UTC - which is now a different local time.

    One possible solution is to find a way to determine (when you setup the run time for the job) whether the machine is in DST or not. Place this in a boolean and update the Job Queue routine to factor this in it's decision to run the job or not - based on whether or not the machine is currently observing DST or not.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • DenSterDenSter Member Posts: 8,304
    What about setting the start time at 3:01, or 1:59?
  • pberbpberb Member Posts: 31
    The time displayed in a Datetime field from NAV shouldn't change like it does by one hour when the present time crosses over from DST to non-DST, and vice versa.

    For example when it's not DST, looking at record with a datetime of 12/01/08 3:15pm changes to 12/01/08 2:15pm when looking at that same record when it is DST. This is a NAV bug. :!:
  • jlandeenjlandeen Member Posts: 524
    I really don't see this as a bug - I see this as an exception rather then the rule. In most cases you want a date time to be static, where as in this case with scheduled jobs there is currently no way to account for Daylight Savings time.

    There is a codeunit that handles the calculation of the next run time (I think it's the Job Queue Dispatcher) that would have to be modified to take DST into consideration when calculating the job.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.