Library Versions:
- AngularJS: 1.6.10
- Angular Material: 1.1.10
- Angular Material Datetimepicker: 1.17.1
- Moment.js: 2.19.3
- MomentTimezone.js: 0.5.13
Description of the Issue:
We store the datetime of events in our database alongside the timezone offset in hours (e.g. -0700
) and the timezone name of the event's location (e.g. America/Los_Angeles
). The timezone offset is used with ng-model-options
on the datetimepicker to correctly set and display the time of the event, even if you aren't in the same timezone as the location of the event. When loading the edit event page, the initial value of the datetime will sometimes shift by an hour either forward or backward. This doesn't seem to have any tie to daylight savings time changing soon in the United States, either (that happens on November 4th).
For example, we have an event on Friday October 26 at 8am and loading the page has resulted in the time changing on load to 7am. It also happened with an event on Monday October 29 at 11am when it loaded to show 12pm.
Unfortunately this issue is inconsistent and, from what we've been able to find, unpredictable to reproduce. Some users don't see it at all while others see it a couple times a day (when editing, on average, a couple dozen or so events per day). I've also seen it with my own eyes in production, but have been unable to reproduce it locally or in a Plunker.
We did recently switch from version 1.12.0 to 1.17.1 to get the fix for #47; that deployment did not change any other event editing code. The deployment happened 6 days ago and this new issue did not appear until that time. As such, it seems possible that a change between those two versions is leading to this. Looking at the file changes from 1.12.0 to 1.17.1, there appears to be quite a few changes around the usage of ng-model-options
that were introduced in the 1.13.0 update. Since we updated from 1.12.0 directly to 1.17.1, we haven't tested any versions in between to know if they also contain the bug or not.
I wish I had more information and a very clear example to provide you like I have with past bug reports, but we haven't been able to crack it. We're hoping the above describes the situation well enough that it may trigger a thought in your head about what could cause such an issue. In the meantime, we will continue to look at this on our end and see if we can pinpoint the exact problem.
Thanks as always for your help and continued support of this library.
EDIT for what it's worth, it does appear that this only happens to users with slower computers. All users that I've spoken to are using Chrome, too.