使用listitemcollection.getbyid更新UTC日期时间,以节省错误的日期时间。 [英] Updating UTC date time using listitemcollection.getbyid saving wrong datetime.
问题描述
我正在开发一个使用Share point 2013作为后端的中间件API。
使用ListItemCollection.GetByID(id)进行更新。在使用UTC时间更新日期时间字段时,时间会在列中存在5小时的时间,而不是我插入的数据。
但是当我调用List.GetItemById(id)来更新ListItem,它在更新时工作正常。
我尝试过:
我用Google搜索了几个小时,但无法找到原因。
I am working on a middle ware API that uses Share point 2013 as back end.
Using ListItemCollection.GetByID(id) to update. While updating a date time field with UTC time, the time goes time-5 hours of the time existed in the column , instead of the data I inserted.
But when I call List.GetItemById(id) to get the ListItem to update, it is working fine when updating.
What I have tried:
I have googled it for hours, but unable to find the reason.
推荐答案
巴基斯坦是5比UTC时间早几个小时。
也许这表明问题出在哪里:对本地时间与UTC时间的混淆。
Pakistan is 5 hours ahead of UTC time.
Perhaps that's an indication of where the problem is: confusion over "local" time versus UTC time.
这篇关于使用listitemcollection.getbyid更新UTC日期时间,以节省错误的日期时间。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!