0

I am looking for a JavaScript based time picker (jquery, extjs, bootstrap etc) control which converts the local time into UTC time. It must take into consideration user location and provide accurate time.

There are lot of controls available which allows you to pick time but I want to know what is the most accurate way to convert the time into UTC equivalent. There are lots of post available which talks about converting time into UTC but some of the post are old and some of them have one or the other catch.

What I am trying to do:

Assume the local time on user machine is 10 AM. I am asking user to pick a time > current time (or a future time). Assume user picks 11:30 AM. I want convert the 11:30 AM (local to his timezone) into UTC equivalent.

SharpCoder
  • 18,279
  • 43
  • 153
  • 249
  • 3
    Why would a UI component concern itself with converting to UTC? Find the picker you want and then convert to UTC. This isn't a meaningfully answerable question. – pvg Dec 24 '15 at 20:04
  • @pvg: I just wanted to know if there is a control already available which can do the work for me. If not, then i can convert the time into UTC but I also want to confirm what is the most reliable way to achieve this. – SharpCoder Dec 24 '15 at 20:10
  • Similar question: [How do you convert a JavaScript date to UTC?](http://stackoverflow.com/questions/948532/how-do-you-convert-a-javascript-date-to-utc?lq=1) – Yogi Dec 24 '15 at 20:42

0 Answers0