-
Notifications
You must be signed in to change notification settings - Fork 1k
"Now" button click sets a wrong Value for the default Timezone. #843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I updated dev branch with this fix. Note that this completely kills the partial support that existed for custom alpha timezones (it was a use at your own risk anyway). |
Thanks a lot! |
I found that this issue is actually coming from
I would suggest to change to:
In order to keep the user-defined timezones. |
Use the next to reproduce:
To reproduce:
3.Wait a few seconds.
For example, after the button click the "now" variable has value eqals "Mon Nov 16 2015 15:05:28 GMT+0200". The result of "now.getMinutes() + now.getTimezoneOffset() + tzoffset"
will be [5(int) + -120(int) + "120"(string)] equls "-115120" instead of 5 as expected, since "tzoffset" will have a string value for the default Timezone. Thus, after the now.setMinutes(-115120) call the date value will be elqual: "Fri Aug 28 2015 16:20:28 GMT+0300".
Fix:
The jquery-ui-timepicker-addon.js code:
should be replaced by:
The text was updated successfully, but these errors were encountered: