olin-build / ABE

Amorphous Blob of Events
https://abe.olin.build/
GNU Affero General Public License v3.0
7 stars 1 forks source link

Fix all-day database entries with seconds #202

Open HALtheWise opened 6 years ago

HALtheWise commented 6 years ago

According to #201 , it should no longer be possible to create an all-day event starting or ending any time except midnight. If any of those currently exist in the database, we should fix them.

osteele commented 6 years ago

There's 36 of these in production db.getCollection('event').find({$where : function() { return this.allDay && this.end.getSeconds() != 0 }}). getMinutes() != 0 returns presumably the same 36; getHours() != 0 returns 35 because _id=5978bfa17412b80011ab821f "Students begin arriving after 12pm" ends a second shy of 1am EST.