-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: allow dates before 1970 #57018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
ChristophWurst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsigned to signed means the value range halves and on mysql/mariadb outliers are silently clipped. but that is fine because we already use bigint so the range is big.
the risk of this change is that mysql/mariadb have to rebuild the table. the old and new data type have the same size, but their layout isn't identical.
nextcloud/calendar#6818 also mentions a 2038 limit. bigint does allow later dates. is this restricted elsewhere?
Yes, there are date limits in the calendar and other places that will need to be removed. The 2038 limit is a 32bit int limit, that can be removed also. |
|
How do we handle dates past 2038 on 32 bit systems? |
We don't lol, 32bit is dead. Intel / AMD 64bit came out in 2000, ARM was 2011. Most Linux distros are dropping or have dropped 32bit versions, MS has stopped 32bit in 2020. |
|
Nextcloud does support 32bit systems. Older Raspberry Pi for example. This is also why the 64bit integer for snowflakes will be stored in a string instead of int. |
|
Nvm, looks like timestamps are explicitly exempt from the 32bit support: https://docs.nextcloud.com/server/stable/admin_manual/installation/system_requirements.html#cpu-architecture-and-os
|
Summary
This fix essentially only effects MariaDB and MySql as PostgreSQL, SQLite and Oracle store int values as signed and are not affected.
Checklist
3. to review, feature component)stable32)