SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.

share|improve this question
I can insert new item to the event list, and take its Created value. But may be there clear solution? – user7268 Jun 6 '12 at 13:46
That would work, created by is generated by SharePoint and won't change. I guess it depends on how you need to use it. Developing a web service to do tht might be unnedded overhead/extra managed code to maintain. – Eric Alexander Jun 6 '12 at 14:38
Maybe you could use the JS variable _spPageContextInfo.clientServerTimeDelta but I am not sure, haven't used that before. – Marc Jan 10 '15 at 8:41
Have you seen ? – eirikb Jun 15 '15 at 11:29

You could just create a custom webservice that returns the server time and call this through JS.

share|improve this answer
Thank you, Steve! This is unexpected and original for me. I'll do it. – user7268 Jun 6 '12 at 13:59
Best thing is that it is universal way for all complex tasks. – user7268 Jun 6 '12 at 14:02
ashx is simpler! – Eric Dec 7 '12 at 2:06
There's a Stack Exchange question about it w/ JS/PHP and JS/HTML solutions for it. – Graham May 13 '15 at 19:58
I'm not sure the Stack Exchange question is related since it's PHP and SharePoint is ASP.NET – Steve Lineberry May 14 '15 at 11:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.