Reputation: 1083
I am trying to use convertTimeZone to get to my local time in Sydney.
Data Factory is happy with with other conversion like
@convertTimeZone(utcnow() , 'UTC' , 'GMT Standard Time') but when I try for my location @convertTimeZone(utcnow() , 'UTC' , 'A.U.S. Eastern Standard Time')
I get an error
In the function 'convertTimeZone', the value provided for the time zone id 'A.U.S. Eastern Standard Time' was not valid.
it is in the list here https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)
Which is provided in the documentation here. https://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions#convertTimeZone
Any ideas ? Thanks
Upvotes: 0
Views: 1505
Reputation: 8660
Please see the description of destinationTimeZone in convertTimeZone function:
The name for the source 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.
So remove .
in A.U.S. Eastern Standard Time and then have a try this expression:
@convertTimeZone(utcnow() , 'UTC' , 'AUS Eastern Standard Time')
April 11, 2023: This format is no more being accepted by Microsoft, the new format is
@convertTimeZone(utcnow() , 'UTC' , 'AET')
Upvotes: 2