cozy / cozy-calendar

An application to manage your events
https://demo.cozycloud.cc/#apps/calendar/
GNU Affero General Public License v3.0
66 stars 39 forks source link

Fix bug about dummy event when exporting calendar #590

Closed CPatchane closed 8 years ago

CPatchane commented 8 years ago

Fix #317. When the calendar app is installed for the first time a dummy event with the exact date 1901-01-01 is created. When a new calendar is created, each time, a dummy event with the date 1901-01-01 RELATED TO THE LOCAL TIMEZONE is created (so 1901-01-01 more or less 12h). There is no way to tell the difference between the dummy event and another event from the DB, so this fix doesn't export any events for end dates before the year 1901 included.

I choose to detect only the year instead of be more accurate (we could prevent only events of 1901-01-01 and 1900-12-31) to not slow down the performance when exporting a lot of events, while using momentJS to keep date formats compatibility.

gregorylegarec commented 8 years ago

Thanks @CPatchane 👍