deepwell / meteor-bootstrap-datepicker

Meteor package of bootstrap-datepicker
6 stars 9 forks source link

UTC functions timezone fix #6

Closed Alexandre-Georges closed 9 years ago

Alexandre-Georges commented 9 years ago

After debugging and checking Mozilla documentation, it turns out that the timezone symbol was switched for both UTC functions.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset

If the timezone is, for instance, GMT - 1, the offset returned by getTimezoneOffset is + 60 and with a GMT + 1, it is - 60.

It basically represents the offset compared to GMT + 0.

deepwell commented 9 years ago

I'm not sure what this is fixing, therefore I'd feel most comfortable merging if it was a fix merged into the upstream bootstrap-datepicker. I checked current master, and only the _local_to_utc function was changed to a minus: http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/js/bootstrap-datepicker.js

Since this package is simply a wrap of the upstream package for meteor, I'd be happy to merge in an updated version of bootstrap-datepicker.

Alexandre-Georges commented 9 years ago

Ok I will cancel the PR then. Thanks!