adamgibbons / ics

iCalendar (ics) file generator for node.js
ISC License
715 stars 152 forks source link

Allow DTSTAMP to be set like any other event attribute #269

Open dambaron opened 8 months ago

dambaron commented 8 months ago

The DTSTAMP field is set using the default values for an event and uses the Date.now() method.

This behavior may lead to flaky UT when trying to perform assertions on the field value since it will change every time a test is run.

The workaround I currently use is to mock the system time through Jest but it would be much easier to allow setting this attribute.