Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the bug that time differs by 1 hour from the selected when BST/DS…
…T clocks change [fix #462] Before this commit the time calculated by the plugin was one hour more than the time selected by the user when the clocks move forward an hour and one hour less when the clocks move back for users in BST/DST regions. This happened because to calculate the selected time, the selected hours were added to the beginning of the selected day. For example, when user selected 02:00 on the day when the clocks move forward then the calculated time was 03:00 because the beginning of the day plus 2 hours is 03:00. This is due to the fact that at 01:00 the clocks move forward an hour. For more details see https://en.wikipedia.org/wiki/British_Summer_Time https://en.wikipedia.org/wiki/Daylight_saving_time In this commit the code was changed to use the hour/minute MomentJS functions to set time: https://momentjs.com/docs/#/get-set/hour https://momentjs.com/docs/#/get-set/minute
- Loading branch information