逻辑应用程序:如何使用 UTC 小时偏移设置本地日期/时间

问题描述 投票:0回答:1

在 Azure 逻辑应用程序中,我想转换 UTC 时间。

如果 UTC 日期/时间是:2023-10-30T18:31:05.123

我想将 UTC 日期/时间转换为 EST 并将日期/时间格式设置为:2023-10-30T14:31:05.123-04:00

我试过这个:convertTimeZone(utcNow(),'UTC','东部标准时间','yyyy-MM-ddTHH:mm:ss.fffzzz')

但是结果是这样的:2023-10-30T14:31:05.123+00:00

即我没有得到正确的 UTC 小时偏移量,它应该是 -04:00。

azure azure-logic-apps datetime-format
1个回答
0
投票

我在我的环境中进行了复制,以下是我的观察结果:

在逻辑应用程序中,即使我尝试过,连接器也会为我们提供+00:00:

enter image description here

您正在朝着正确的方向前进,获得差异,然后将其连接起来,据我所知,除此之外没有其他方法可以做到这一点(或在末尾手动连接 -4:00):

Design:

enter image description here

Output:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.