How can I set a timezone in the datetimepicker?

leandrotk picture leandrotk · Jan 20, 2015 · Viewed 35.8k times · Source

I'm using this datetimepicker jquery plugin: http://xdsoft.net/jqplugins/datetimepicker/ and I didn't get it how to use timezone. I saw the documentation, but I couldn't find it.

What I tried to do is something like that:

serviceDateTime.datetimepicker({
  lang: 'pt-BR',
  format: 'd/m/Y H:i',
  mask: true,
  step: 30,
  showTimezone: true,
  timezone: "-0200"
});

Any help? Thanks in advance!

Answer

David Kim picture David Kim · Jan 20, 2015

The plugin is simply used to give the user an interface to pick date and time.

If you're concerned about the display to be based on your timezone, see if this helps:

Accounting for Timezone with jQuery datepicker