How to get System Time Zone

timespan

#1

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!!!


#2

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.


#3

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


How to get the system time
#4

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


#5

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.


#6

Thank You Saranya :slight_smile: