Related to #191, it's possible for the library to emit incorrect events from the future, notably session start events.
The pull request correctly filters out events created with invalid future dates, but the correct fix would involve testing for whether or not a session is in progress before creating any such invalid records. xdrip does this by testing for 0XFFFFFFFF as a sentinel timestamp meaning that there are no records to produce, which eliminates the need for filtering.
(On a personal note, I'm curious if there is any interest in moving towards SPM based architecture, as this would allow me to contribute and test on linux for issues like these.)
Related to #191, it's possible for the library to emit incorrect events from the future, notably session start events.
The pull request correctly filters out events created with invalid future dates, but the correct fix would involve testing for whether or not a session is in progress before creating any such invalid records. xdrip does this by testing for
0XFFFFFFFFas a sentinel timestamp meaning that there are no records to produce, which eliminates the need for filtering.The result is that future SAGE events show up in Nightscout.
(On a personal note, I'm curious if there is any interest in moving towards SPM based architecture, as this would allow me to contribute and test on linux for issues like these.)