Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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. –  PirateEric 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 at 8:41

1 Answer 1

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

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.