Forum Discussion

MichaelMcFarlan's avatar
MichaelMcFarlan
Contributor
15 years ago

Rather lost as to why aqDateTime.SetSystemDateTime isn't working

Up until recently I have been running tests that set the date to a specific date back in 2009, and then would set it back after the script was done. A few days ago the function I had been using for months just stopped working and I have no idea why. Basically aqDateTime.SetSystemDate just stopped working. Running this does absolutely nothing now:

var testSystemTime = aqDateTime.SetDateTimeElements(2009, 5, 14, 15, 49, 0);

aqDateTime.SetSystemDateTime(testSystemTime);



I'm the administrator on this computer so that isn't an issue. I have no idea what could be causing this. Any ideas?

4 Replies


  • Hi Michael,





    We failed to reproduce such behavior. Please specify what operating system you are using including its bitness.
  • I figured out what had caused it. I had enabled User Account Controls on Vista (64bit), I'll make sure never to make that mistake again. I disabled it and setting the time works fine again.
  • While I was looking through the helpfile to see if this is mentioned anywhere (which it isn't as far as I can see), I noticed a typo in the aqDateTime.SetDateTimeElements. This is what the description says:

    Use the SetDateTimeElements method to create a Date variable
    having the specified year, month, day, hour, minute and second. To specify only
    the date portion, use the SetTimeElements
    method. To specify only the time portion, use the SetTimeElements
    method.


    Obviously the first link is supposed say SetDateElements, that is also where it links to, just the display text is off.

  • Hi Michael,





    looking through the helpfile to see if this is mentioned anywhere (which it isn't as far as I can see)


    We will add necessary information to the help system.





    a typo in the aqDateTime.SetDateTimeElements


    We'll correct it.





    Thank you for the information.