How to get System Time Zone

Hi,

I want to show the Current date and time with the Time Zone.
Can someone help me, how to get the System TimeZone in UiPath

Thanks!!!

I think you can utilize System.TimeZone class.

Create a variable of type TimeZone and intialize as System.TimeZone.CurrentTimeZone.

Variable.StandardName should give you the name of current timezone.

2 Likes

Hi,

TimeZoneInfo can be used.

system.TimeZoneInfo.Local

Please find the attached workflow to understand better.
TimeZone.xaml (6.5 KB)

Thanks,
Saranya K R

3 Likes

Thank You!!!
I am getting “(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi”.
is there any way I can get only “(UTC+05:30)”?

TimeZone.BaseUtcOffset returns only 05:30:00

Another solution is Split string or sub-string function can be used to extract only first few letters.

Thank You Saranya :slight_smile: