question

TimStevic-7194 avatar image
0 Votes"
TimStevic-7194 asked TimStevic-7194 answered

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

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.

office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

WendyLi-MSFT avatar image
0 Votes"
WendyLi-MSFT answered

Hi @TimStevic-7194
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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TimStevic-7194 avatar image
0 Votes"
TimStevic-7194 answered

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.


list-image.png (16.4 KiB)
column-edit.png (16.3 KiB)
new-item-add.png (21.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.