Reputation: 65
I'm sending an email and I want to get the time when a file is uploaded, but the default time is in UTC.
I tried several things to convert from UTC to Central Time for example. Is there any expression to convert from UTC in Azure Logic Apps?
I tried the following expression:
convertTimeZone('HH:mm:ss', 'UTC', 'Pacific Standard Time')
Upvotes: 3
Views: 11642
Reputation: 5526
As suggested by Timothy Radier , you can use combination of both formatDateTime ,convertTimeZone expression to covert the UTC time zone to Central standard time zone.
formatDateTime(convertTimeZone(utcNow(), 'UTC', 'Central Standard Time'),'HH:mm:ss')
Alternatively , By default central time zone is 5 hours behind the utc time you can also use 'subtractFromTime' expression to convert utc time to central time.
formatDateTime(subtractFromTime(utcNow(),5,'Hour'),'HH:mm:ss')
Here is the reference output :
Upvotes: 5