Skip to content

#1588: Allow negative linux epoch#1635

Open
abpai94 wants to merge 2 commits into
sabre-io:masterfrom
abpai94:1588-allow-negative-linux-epoch
Open

#1588: Allow negative linux epoch#1635
abpai94 wants to merge 2 commits into
sabre-io:masterfrom
abpai94:1588-allow-negative-linux-epoch

Conversation

@abpai94

@abpai94 abpai94 commented Mar 29, 2026

Copy link
Copy Markdown

Closes #1588

@abpai94

abpai94 commented Apr 3, 2026

Copy link
Copy Markdown
Author

Possibly a bit overkill to verify that firstOccurence and lastOccurence are consecutive considering as 64 bit INT timestamps will roll-over in the year 2262. But if there are still people running 32 bit systems in 2038 maybe it will come in handy.

@abpai94 abpai94 force-pushed the 1588-allow-negative-linux-epoch branch from 80753ae to 98f6777 Compare April 4, 2026 08:56
@abpai94 abpai94 force-pushed the 1588-allow-negative-linux-epoch branch from 98f6777 to 206f9ce Compare April 4, 2026 08:57
@ralflang

Copy link
Copy Markdown

Possibly a bit overkill to verify that firstOccurence and lastOccurence are consecutive considering as 64 bit INT timestamps will roll-over in the year 2262. But if there are still people running 32 bit systems in 2038 maybe it will come in handy.

I feel different about this. People may very well use their calendaring/event system to model zany things such as the repetition of easter or moon phases or anniversaries of battles because it contains all the complicated date math already - and exposing them to caldav/carddav may be an unintended but welcome side effect. Being defensive about dates outside our narrow PIM horizon isn't overkill, it's prudent.

@abpai94

abpai94 commented Apr 29, 2026

Copy link
Copy Markdown
Author

@ralflang yes you make a good point, we should cover the edge cases and throw an error if we ever end up rolling over to prevent dates getting wrongly added to the calendar.

However I used https://www.epochconverter.com/ to calculate the 64 bit date (year 2262) and I think the website didn't provide the right answer if I understood correctly. But I'm still working on verifying this before pushing for a fix.

@abpai94

abpai94 commented May 2, 2026

Copy link
Copy Markdown
Author

@ralflang as a heads up you may want to checkout the following issues which is also related sabre-io/Baikal#1344 where I have proposed some changes to the MySQL and Postgres database schemas. If you are using either of them you should apply the patch I have proposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux Epoch prevents events (birthdays) being created older than 1st January 1970

2 participants