I have a problem need resolution asap.
My server is in GMT timezone, but my system is in EST timezone,I am calling Date function to find out current date. If I run the script in the night,if GMT is 21st Feb but EST is still 20th Feb and the script fails. Is there a way out? Plz help!!!
Thanks and Regards,
If you are executing the tests on the EST always. Subtract the time diff between the server time and your local time after using the date function and use the new time for further processing.
will give you the actual date/time of the connected QC-Server
de omnibus dubitandum
For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this
Try this: od = now()
'**Creating a COM object**
set oShell = CreateObject("WScript.Shell")
'**Accessing the Registry value of 'Active Time Bias**
atb = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contr ol\TimeZoneInformation\ActiveTimeBias"
'**Storing the value of atb key from the registry**
offsetMin = oShell.RegRead(atb)
'**Returning a date to which a returned minutes added**
nd = dateadd("n", offsetMin, od)
So, nd variable is containing the GMT date time.
Hope this wud help. For details on registry keys such as Active Time Bias refer to http://www.windowsitpro.com/