smalot/bootstrap-datetimepicker — pull request #319 by alexpts (2014-08-29 12:44:34+00:00)
Title: Fix dateUTC from Date object

I think need an operation of addition, because the time zone already contains the arithmetic sign

new Date(1409315031000 -14400000) = Date {Fri Aug 29 2014 12:23:51 GMT+0400 (MSK)}
new Date(date - date.getTimezoneOffset() * 60000) = Date {Fri Aug 29 2014 20:23:51 GMT+0400 (MSK)}
new Date(date.valueOf() + (date.getTimezoneOffset() * 60000)) = Date {Fri Aug 29 2014 12:23:51 GMT+0400 (MSK)}

date.valueOf()	= 1409315031000
date.getTimezoneOffset() * 60000 = -14400000
date.getTimezoneOffset() = -240

Run `new Date('2014-08-29T08:23:51-04:00')` created `Date {Fri Aug 29 2014 16:23:51 GMT+0400 (MSK)}` in my time zone.

Date {Fri Aug 29 2014 16:23:51 GMT+0400} = Date {Fri Aug 29 2014 12:23:51 GMT+0000} // true
Date {Fri Aug 29 2014 16:23:51 GMT+0400} = Date {Fri Aug 29 2014 20:23:51 GMT+0000} // false