Reputation:
I want to write expression in a "Set Variable" activity and convert utcnow() to "IST" (Indian Standard Time"
I wrote the expression as : @convertTimeZone(utcnow(),'UTC','Indian Standard Time')
and I get the below error while I debug the pipeline:
In the function 'convertTimeZone', the value provided for the time zone id 'Indian Standard Time' was not valid. '.
I tried:
@convertTimeZone(utcnow(),'UTC','Pacific Standard Time')
and
@convertTimeZone(utcnow(),'UTC','Eastern Standard Time') and the debug runs just fine for both of these
how to make it work for the cases where it doesn't ?
Upvotes: 2
Views: 28746
Reputation: 8660
There is no 'Indian Standard Time' in Microsoft Time Zone Index Values, instead it is 'India Standard Time'.
So you should change your expression to this:@convertTimeZone(utcnow(),'UTC','India Standard Time')
Update:
The name for the target time zone. For time zone names, see Microsoft Time Zone Index Values, but you might have to remove any punctuation from the time zone name.
When you use the time zone in Microsoft Time Zone Index Values, you need to remove any punctuation from the time zone name.
Upvotes: 9