IHow do I standardize a date time field in a List to UTC when the data is input form around the world

Tim Stevic 1 Reputation point
2021-09-30T22:41:05.247+00:00

I have a date and time field which captures the date of input automatically both from the PC and from the mobile app.

I have users from around the world and the time is captured in their local time - but I do not know what the time zone is (they are using whatever their global setting is). How do I get this date and time I captured to show in a consistent time zone - like UTC +0?

To compound this - any entry coming from mobile device always captures in UTC + 0 format no matter what time zone they re in.

Is there a way at least in Lists to show the time zone that was captured when the time was set? When I look at the time or extract to excel there is no time zone listed.

Does this make sense? It is easy to replicate is you have people in 2 different time zones.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,402 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Wendy Li_MSFT 1,711 Reputation points Microsoft Vendor
    2021-10-01T07:28:24.877+00:00

    Hi @Tim Stevic
    How did you get the date? Via JS code or others?

    If you get it via JS code, you can use Date.prototype.getTimezoneOffset() to calculate the local time zone and store it in a new column to identify the time zone.

    Third-party information disclaimer:
    The third-party product that this article discusses is manufactured by a company that is independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of third-party products referenced in this article.

    ----------------------------

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Tim Stevic 1 Reputation point
    2021-10-01T13:31:59.177+00:00

    The date and time are automatically entered into the list when a new item is created.

    Here is how the list looks normally:136970-list-image.png

    Here is the definition of the date/time column:

    137002-column-edit.png

    And here is what it looks like when you are adding a new item:

    136958-new-item-add.png

    When people in different time zones add an element, the date and time is stored in their locally defined time zone which makes it difficult to baseline the date. Compounding that is any entry made via the mobile SharePoint app is saved in UTC+0 irrespective of the local time zone.

    If I could isolate the time zone, then a calculation could be performed to baseline the date time to all be in UTC-0.

    0 comments No comments