I am pretty sure this is a bug,
Basically, my browser/local is in (-300 minutes offset from UTC, Mountain) MST timezone. I have a simple datetimepicker with timezoneList only in CDT (Centra, -300 minutes offset from UTC).
Now, when I call setDate 1st time, the timer is set to current timestamp as localtimezone (this is expected and this is what I want);
However, when I call setDate 2nd time, the timer gets incorrectly set to 1 hour behind localtimezone
> Date() // This is my current timezone with current timestamp
> "Wed Jun 24 2015 11:33:05 GMT-0600 (Mountain Daylight Time)"
> $('#timezone_example_2').datetimepicker('getDate') // as you can see, no timeset to #timezone_example_2
> null
> $('#timezone_example_2').datetimepicker('setDate', new Date()) // 1st time setting to #timezone_example_2 causes it to set to "06/24/2015 11:33 -0500"
> []
> $('#timezone_example_2').datetimepicker('getDate')
> Wed Jun 24 2015 10:33:00 GMT-0600 (Mountain Daylight Time)
> $('#timezone_example_2').datetimepicker('setDate', new Date()) // 2nd time setting to #timezone_example_2 causes it to set to "06/24/2015 10:33 -0500" (This is not correct. It should be set to 06/24/2015 12:33 -0500 as current timestamp is 06/24/2015 11:33 -0600)
> []
> $('#timezone_example_2').datetimepicker('getDate')
> Wed Jun 24 2015 09:33:00 GMT-0600 (Mountain Daylight Time)
> new Date()
> Wed Jun 24 2015 11:33:40 GMT-0600 (Mountain Daylight Time)
I am pretty sure this is a bug, Basically, my browser/local is in (-300 minutes offset from UTC, Mountain) MST timezone. I have a simple datetimepicker with timezoneList only in CDT (Centra, -300 minutes offset from UTC).
Now, when I call
setDate
1st time, the timer is set to current timestamp as localtimezone (this is expected and this is what I want);However, when I call
setDate
2nd time, the timer gets incorrectly set to 1 hour behind localtimezone