Forum Discussion
TimoF
9 years agoOccasional Contributor
Hello
I was searching for the same topic (I know this is an old post) and I found another solution which works better for newer OS.
Windows7 and also Windows Server 2008 R2 has the command 'tzutil' which can easily change time zone from windows command line (reference http://www.windows-commandline.com/set-time-zone-from-command-line/).
So the JScript version of the setTimeZone() would be:
function setTimeZone(Timezone) { var WshShell = Sys.OleObject("WScript.Shell"); var CmdLine = "tzutil /s "; var Param = CmdLine + aqString.Quote(Timezone); Log.Message("Parameter: "+ Param); var WshShellExec = WshShell.Exec(Param); }
Related Content
- 11 years ago
- 5 years ago