You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PowerApps保存至SharePoint列表后时间显示异常问题求助

Troubleshooting UTC Time Conversion Issues Between PowerApps and SharePoint

Let's break down your problem step by step and fix the time mismatch you're seeing.

First: Confirm the Correct UTC Conversion Formula

In PowerApps, the right way to convert local time to UTC is using this formula:

DateAdd(Now(), -TimeZoneOffset(), Minutes)

Here's why this works:

  • TimeZoneOffset() returns the minute difference between your local time and UTC. For your case, it's -480 (which equals -8 hours), meaning your local time is 8 hours behind UTC (UTC-8 timezone).
  • Subtracting that offset (so -(-480) = +480 minutes = +8 hours) gives you the correct UTC time. For your local 5:30 PM (17:30), this would calculate to 1:30 AM next day UTC.

If you previously used DateAdd(Now(), TimeZoneOffset(), Minutes) (adding the offset instead of subtracting), you'd get 17:30 - 8h = 9:30 AM UTC—this wrong UTC value is likely the first piece of the puzzle.

Second: Check Your SharePoint Site's Time Zone Setting

SharePoint stores all datetime values as UTC, but displays them converted to the site's configured time zone. If your device's timezone doesn't match the site's, you'll see unexpected times:

  1. Go to your SharePoint site → Click the settings gear → Site info → View all site settings.
  2. Under "Site Administration", select "Regional settings".
  3. Verify the "Time zone" matches your device's timezone (UTC-8 in your case).

Your "no conversion" test gives a clue here: when you updated SharePoint directly with Now(), your local 2:54 PM showed as 11:54 PM. That means SharePoint is treating your local time as UTC, then converting it to the site's timezone. For example:

  • If your site is set to UTC+9, UTC 14:54 (your local time) converts to 14:54 +9h = 23:54—exactly what you saw. This confirms a timezone mismatch between your device and the SharePoint site.

Third: Fix and Validate

  1. Update your OnSuccess formula to use the correct UTC conversion:
    DateAdd(Now(), -TimeZoneOffset(), Minutes)
    
  2. Align your SharePoint site's timezone with your device's timezone (or adjust based on your team's needs).
  3. Test again: Calculate the expected UTC time manually, then check what SharePoint displays. For example, if your local time is 5:30 PM UTC-8, correct UTC is 1:30 AM next day. If your site is set to UTC-8, SharePoint will display this as 5:30 PM the previous day (which matches your local time—since UTC+8h is next day, converting back to UTC-8 subtracts 8h).

If you still see a 1-hour difference, double-check if daylight saving time is enabled for either your device or the SharePoint site—this can add an extra offset that's easy to miss.

内容的提问来源于stack exchange,提问作者tinker

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 03:50:44