Changing Of Time Zone / Date in UiPath DB / GMT TO PST Time Zone /

The date in UiPath Db is stored in GMT format. Can it be converted to PST timezone?


Please follow the below steps:

  1. Login to Orchestrator -> Profile -> Settings -> General
  2. Modify the TimeZone based on the requirement. (PST = UTC -8 )

hi @PranayaSahu

Check this code

var dt = DateTime.Parse(“1/1/2013”);
MessageBox.Show(TimeZoneInfo.ConvertTimeToUtc(dt, TimeZoneInfo.Local).ToString());

Ashwin S

This doesn’t work for me. I have had the timezone set in the Orchestrator GUI correctly as you describe. What I see on the screen is correctly displayed in my timezone. But the timestamp in the database is 5 hours off because it’s still stored in UTC and not the time I specified. I’d like to be able to build a report from data in the Orchestrator database without having to convert to/from UTC. Is there such an option?

If you want convert Date and time in one time zone to another time zone use the Following logic:

Assign Date = “Date u want to set”
Assign SourceTimeZone = TimeZoneInfo.FindSystemTimeZoneById(“Actual time zone”)

Assign DestinationTimeZone = TimeZoneInfo.FindSystemTimeZoneById(“Expected Time Zone”)

Assign ConversionOfTimeZone = TimeZoneInfo.ConvertTime(Date, SourceTimeZone, DestinationTimeZone)

Variable Description:
SourceTimeZone : System.TimeZoneInfo
DestinationTimeZone : System.TimeZoneInfo
ConversionOfTimeZone : System.DateTime

I have tried this but getting below compiler error