How to pass correct date value to orchestrator from uipath studio

I’m using licensed studio and orchestrator.

I’m getting system using new System.DateTime().Now and this is printing date and time in correct local format.

But when I tried to set this value to orchestrator asset using ‘Set asset’, date values are storing in GMT format.

I already configured correct timezone under orchestrator settings tab but still, date values are storing to assets in GMT format always. Any help here to save exact date value to asset ?

Example: Uipath Studio logs printing date as : Sat Mar 02 2019 14:04:00 but the same stored into asset as Sat Mar 02 2019 16:04:00 GMT+0200.

Thanks in advance.

If you are running your bot in same machine as orchestrator? If yes, while printing by running the bot should give same value.

If you are running bot in local where it prints correctly and want to push this value into orchestrator asset

  1. Try to assign value of System.DateTime().Now to a variable first
  2. Use this variable in setAsset

Dear Arun, thank you . I’m passing value to set asset through a variable already. Not specified directly. But still, value is storing into orchestrator in different way as I mentioned in question.

Bot machine and orchestrator machine are different virtual machines but both are under same time zone and under same physical server (same cluster). No changes at all between systems except system name.

Hi @suripaleru

Could you post a sample of your workflow?

I believe what the original poster is saying that is you write the current time to a text Asset the time is changed. For example:

If I add a write line activity with a value of: System.DateTime.Now.ToString. The output is: 03/19/2020 14:54:08.

However, if I use the Set Asset activity with a value of System.DateTime.Now.ToString I see this:

In this case, both the robot and the orchestrator tenant are set for -6:00 Central Time (US canada).