On some websites, when I get an item by


, the API returns the Created and Modified fields in an unknown timezone (presumably the site's timezone) instead of UTC:

"Created": "2019-01-17T18:55:41",
"Modified": "2019-01-17T18:55:41",

However if I get the item by <site-url>/_api/web/lists(<list-id>)/items(<item-id>) the responded times are in UTC:

"Created": "2019-01-18T02:55:41Z",
"Modified": "2019-01-18T02:55:41Z",
  1. When and why does this happen?
  2. How can I get the datetime in a "correct" format? That is, is there any way to force the API to return the times in UTC without changing the site or list's settings, or to request the API to return the time along with its timezone?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.