Let me be a little more clear. According to the Silk documentation, the built-in GetDateTime function "captures the current date and time from the host system".
I interpret this to mean that if I execute this while running scripts on a remote machine, I will be getting the date and time on the host machine.
The problem I am having is that I am exporting and comparing reports during regression. The reports have the date and time in the page header.
I would like to be able to get date and time on the remote machine, set the date and time to constant value, print reports, then restore the date and time to the original values.
I am hoping that I can call the functions in kernel32.dll to get and set the system time on the remote machines.
Using the dll from the kernel32.dll will also return the DateTime of the host machine. I have tried that. If you can write a script which clicks the TaskManager and changes the time, it will change the time on the machine where the agent is present.
I have used the SetLocalTime and GetLocalTime functions in kernal32.dll remotely. Any user function that does not return a value can be executed remotely. So my remote functions use inout arguments instead of returning a value.
I had originally used the GetSystemTime and SetSystemTime functions but I found out that these functions do not make timezone or daylight saving time adjustments so they can give different results on different machines. Where as the LocalTime functions make these adjustments.