I\'m looking for the best practice/solution to book a service internationally, using same time in any browser. I don\'t quite get the logic (and dug around here too).
Us
There are a couple of ways you can go about this.
Option 1
Use moment.js to parse and format the strings without introducing the browser's offset. For example:
// to get a Date value suitable for use with an existing control or script.
var date = moment('2013-04-19T14:00').toDate();
// to get a string back from a Date that's ready to go to your server.
var str = moment(date).format('YYYY-MM-DDTHH:mm');
On the server side, it depends what platform you are on. Probably ISO8601 is already supported. For example, in .Net it is simply .ToString("o")
. If you need specific advise on this, please tell us about your server platform/language.
Option 2