Translate veni vidi vici
![translate veni vidi vici translate veni vidi vici](https://file.ydwenku.com/fileroot0/2019-6/3/766ec36d-4cf3-4711-98df-b639273baed7/766ec36d-4cf3-4711-98df-b639273baed73.gif)
Ok, so let’s start with the computer in EDT and take a look at what our client side code does: Adjust the Items Date field into UTC time and display it.Adjust the Items Date field into the time zone of the regional settings in effect on the server and display it.Get the Items Date No Time field, create a JavaScript date object, display the date object and the string that was used to create it.Get the Items Date field, create a JavaScript date object, display the date object and the string that was used to create it.Gets all the items in my SPDateTime list and loops through them, for each item….Read the regional settings of the site.I’ve written some code that I’m going to expose using a CEWP… the code does the following things: Regardless of who entered the item the dates are displayed based on the regional settings effective on the site. Again, this is to illustrate that the local time of the computer has no bearing on what SharePoint sees the date/time as. I set the dates and times for both items the same from their respective UIs. I created an item in the list from my computer set to Eastern time… Then I went to my computer set to Pacific time and created a second item. The date only field was to illustrate that the problem exists regardless of whether the user intentionally sets the time or not. I created a list with a title field, and two date fields one to show date/time and one to show just date. Then I have a SharePoint site collection whose regional settings are set for Eastern Time (or UTC-5:00 aka EDT). I set my virtual machine’s time zone to Pacific Daylight Time (PDT) and my main machine is set to Eastern Daylight Time (EDT). I’ve set up a scenario to illustrate the point with a couple of manipulations you can make depending on your desired goals. Sadly, this doesn’t translate as well to JavaScript as you might like. The REST endpoints that return the data for you give you the date string in a format that is specific to the regional settings of the person asking for them. This makes wonderful sense, except when you try and write JavaScript against those same data points. If you’re using SharePoint out of the box because all the content is rendered on the server and pushed to the client with all the date/time translation has been done for you. The site collections, sites, and the users, can have their own time zone settings. SharePoint stores all its date/time fields in UTC time. If you develop client side solutions for SharePoint you’ve either run into this or you will run into the following scenario. SharePoint time, is not your time, is not their time.