Is there a way to identify the user's time zone from an Automation script?
For instance, if a user is running Cube launcher on a PC that is set to GMT 0, if I target a DMA that is set to GMT+3, how can I determine that GMT 0 has to be used in the Automation script?
If I use C# TimeZone.CurrentTimeZone.StandardName, I always get the server's time zone.
Is there a way to determine the user's timezone?
Hi David,
I could not find a direct way to retrieve the time zone of the connected client machine via C#. However, if you are able to link the Automation script to a button in a Visio file, you could use the placeholder [LocalTime] (more info in DataMiner Help). You can pass the value of this placeholder to the Automation script using a script parameter. For example, if the script name is myScript and the script parameter is myParam, you could define the following data shape:
Data shape: Execute
Value: Script:myScript||myParam=[LocalTime]||NoConfirmation,NoSetCheck
Thanks Miguel. It indeed works as expected.
Using the placeholder LocalTime gives the Automation script the possibility to detect the DateTime of the client.
I can have a client in UTC zone and another in GMT +3, and I’m now able to identify which time is configured on the client’s host.