SlateFoundation / slate-cbl

http://slatefoundation.github.io/slate-cbl/
MIT License
7 stars 7 forks source link

fix: correct time zone change bug #729

Closed BillClinton closed 2 years ago

BillClinton commented 2 years ago

The data being loaded for the student task tests uses the dayjs library to add and subtract days from dates. There is a bug in this library that does not account for time zone changes, specifically the change from EDT to DST when that change occurs in the intervals of the two times.

As this problem was a problem with the data being inserted by the test, and not a bug in Slate itself, I decided to change the way the data is being inserted during the test. Rather than attempt to load the data manually, the data is now mostly loaded using the actual Slate UI, which mirrors how actual data would be inserted and bypasses the issues with the dayjs library that occur when loading data directly.