Nim
Nim copied to clipboard
fixes #20285; prevent oid time overflow at year 2038
fixes #20285 ref https://github.com/py-bson/bson/pull/117
I reproduce the issue by setting the date on my computer to year 2038.
Is it possible to add a test for this?
I guess not too easy, at least we probably can get one at openSUSE :)
I'm ok with either:
- Matching whatever behavior MongoDB exhibits (as long as the behavior isn't "raise an exception")
- Increasing the underlying integer size to 64 bits.
I say, please increase the underlying integer size to 64 bits.
Sure
Once again, I set the system date to 2038 and there is no problem.
Thanks for your hard work on this PR! The lines below are statistics of the Nim compiler built from db8a62d4802a005b80aa07ca355ddee4bf098b11
Hint: mm: orc; threads: on; opt: speed; options: -d:release 164054 lines; 12.595s; 842.328MiB peakmem