Skip to content

datetime: fix checking timestamp range in new and set#12155

Merged
Buristan merged 1 commit intotarantool:masterfrom
tmr-g:i12147
Apr 21, 2026
Merged

datetime: fix checking timestamp range in new and set#12155
Buristan merged 1 commit intotarantool:masterfrom
tmr-g:i12147

Conversation

@tmr-g
Copy link
Copy Markdown
Contributor

@tmr-g tmr-g commented Dec 16, 2025

Now datetime.new() and datetime_object:set()
check timestamp value to be in valid range.
Out of range timestamps produce an error instead of assertion failure.

Fixes #12147


Waits for #12423 and it's backports #12549 #12550 #12551 #12552 #12553 to be merged.

@coveralls
Copy link
Copy Markdown

coveralls commented Dec 16, 2025

Coverage Status

coverage: 87.602% (+0.009%) from 87.593%
when pulling 84a39d0 on tmr-g:i12147
into 0f2a217
on tarantool:master
.

@tmr-g tmr-g force-pushed the i12147 branch 4 times, most recently from 528462d to 9394677 Compare December 18, 2025 22:47
@tmr-g tmr-g marked this pull request as ready for review December 18, 2025 22:47
@tmr-g tmr-g requested a review from a team as a code owner December 18, 2025 22:47
@tmr-g tmr-g force-pushed the i12147 branch 2 times, most recently from b97c666 to 8552bb7 Compare December 20, 2025 23:30
@tmr-g tmr-g changed the title datetime: fix checking timestamp range in new datetime: fix checking timestamp range in new and set Dec 20, 2025
Comment thread changelogs/unreleased/gh-12147-datetime-new-check-timestamp-range.md Outdated
@tmr-g tmr-g requested a review from ligurio December 25, 2025 10:25
@tmr-g tmr-g force-pushed the i12147 branch 3 times, most recently from 9542ee7 to f458d1b Compare December 28, 2025 21:57
Copy link
Copy Markdown
Member

@ligurio ligurio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch! In general everything is good, let's make some changes, see my comments.

Comment thread src/lua/datetime.lua Outdated
Comment thread test/app-tap/datetime.test.lua Outdated
Comment thread test/app-tap/datetime.test.lua Outdated
Comment thread test/app-tap/datetime.test.lua Outdated
Comment thread src/lua/datetime.lua
Comment thread src/lua/datetime.lua Outdated
Comment thread test/app-tap/datetime.test.lua Outdated
Comment thread test/app-tap/datetime.test.lua Outdated
Comment thread src/lua/datetime.lua
Comment thread src/lua/datetime.lua
@tmr-g tmr-g force-pushed the i12147 branch 7 times, most recently from f9f2a52 to 6d43487 Compare March 15, 2026 19:23
@tmr-g tmr-g force-pushed the i12147 branch 2 times, most recently from a39432f to b6e6b58 Compare March 17, 2026 23:49
@tmr-g tmr-g requested a review from ligurio April 1, 2026 18:01
Copy link
Copy Markdown
Member

@ligurio ligurio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jenya, thanks for the patch! LGTM with two minor comments inline.

Comment thread test/app-tap/datetime.test.lua Outdated
Comment thread test/app-tap/datetime.test.lua Outdated
@ligurio ligurio removed their assignment Apr 15, 2026
Now `datetime.new()` and `datetime_object:set()`
check timestamp value to be in valid range.
Out of range timestamps produce an error instead of assertion failure.

Fixes tarantool#12147

NO_DOC=bugfix
@tmr-g tmr-g added backport/2.11 Automatically create a 2.11 backport PR backport/3.2 Automatically create a 3.2 backport PR backport/3.3 Automatically create a 3.3 backport PR backport/3.5 Automatically create a 3.5 backport PR backport/3.6 Automatically create a 3.6 backport PR full-ci Enables all tests for a pull request labels Apr 20, 2026
@Buristan Buristan merged commit a72640f into tarantool:master Apr 21, 2026
133 of 135 checks passed
@TarantoolBot
Copy link
Copy Markdown
Collaborator

Successfully created backport PR for release/2.11:

@TarantoolBot
Copy link
Copy Markdown
Collaborator

Successfully created backport PR for release/3.2:

@TarantoolBot
Copy link
Copy Markdown
Collaborator

Successfully created backport PR for release/3.3:

@TarantoolBot
Copy link
Copy Markdown
Collaborator

Successfully created backport PR for release/3.5:

@TarantoolBot
Copy link
Copy Markdown
Collaborator

Successfully created backport PR for release/3.6:

@TarantoolBot
Copy link
Copy Markdown
Collaborator

Backport summary

@tmr-g tmr-g deleted the i12147 branch April 21, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/2.11 Automatically create a 2.11 backport PR backport/3.2 Automatically create a 3.2 backport PR backport/3.3 Automatically create a 3.3 backport PR backport/3.5 Automatically create a 3.5 backport PR backport/3.6 Automatically create a 3.6 backport PR full-ci Enables all tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] datetime.new() & dt:set() aborts with out of range timestamp

6 participants