datetime: supported parse of h's or m's frac part#3
Merged
Conversation
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 4, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored for better error detection & to simplify code: - offset value post condition check is moved to `parse_tz_suffix`. - this check uses tzoffset valid range instead of int16_t min/max. - offset arg type of `parse_tz_suffix` to valid for TZoffset int16_t. - The better error detection lead to assertion fails of datetime tests with decimal fraction of hours and minutes. So we need tarantool/c-dt#3. It's the first way to fix the problem which is mentioned in tarantool#12082. - datetime.c unit tests refactored. The number of tap test checks is being calculated using the lenght of test data tables. FIXME: need to update c-dt submodule hash. Requires tarantool/c-dt#3 Closes tarantool#12082 NO_DOC=FIXME, must have NO_CHANGELOG=FIXME, must have
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 4, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset int16_t.
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
- datetime.c unit tests refactored. The number of tap test checks
is being calculated using the lenght of test data tables.
FIXME: need to update c-dt submodule hash.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=FIXME, must have
NO_CHANGELOG=FIXME, must have
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 10, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset int16_t.
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
- datetime.c unit tests refactored to simpilfy it's support.
The number of tap test checks is being calculated
using the lenght of test data tables.
FIXME: need to update c-dt submodule hash.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=FIXME, must have
NO_CHANGELOG=FIXME, must have
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 10, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset int16_t.
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
- datetime.c unit tests refactored to simpilfy it's support.
The number of tap test checks is being calculated
using the lenght of test data tables.
FIXME: need to update c-dt submodule hash.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=FIXME, must have
NO_CHANGELOG=FIXME, must have
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 10, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset int16_t.
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
FIXME: need to update c-dt submodule hash.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=FIXME, must have
NO_CHANGELOG=FIXME, must have
4a3058f to
91c68e5
Compare
ligurio
reviewed
Dec 12, 2025
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 16, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset int16_t.
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
FIXME: need to update c-dt submodule hash.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=FIXME, must have
NO_CHANGELOG=FIXME, must have
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 16, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset int16_t.
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
FIXME: need to update c-dt submodule hash.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=FIXME, must have
NO_CHANGELOG=FIXME, must have
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 16, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset int16_t.
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
FIXME: need to update c-dt submodule hash.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=FIXME, must have
NO_CHANGELOG=FIXME, must have
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 16, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset int16_t.
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
FIXME: need to update c-dt submodule hash.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=FIXME, must have
NO_CHANGELOG=FIXME, must have
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 16, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset int16_t.
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
FIXME: need to update c-dt submodule hash.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=FIXME, must have
NO_CHANGELOG=FIXME, must have
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 16, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset int16_t.
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
FIXME: UPDATE c-dt submodule hash TO COMMIT FROM tarantool/c-dt
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=FIXME, must have
NO_CHANGELOG=FIXME, must have
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 16, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset (int16_t).
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=bugfix
FIXME: UPDATE c-dt submodule hash TO COMMIT FROM tarantool/c-dt
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 16, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset (int16_t).
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=bugfix
FIXME: UPDATE c-dt submodule hash TO COMMIT FROM tarantool/c-dt
tmr-g
added a commit
to tmr-g/tarantool
that referenced
this pull request
Dec 16, 2025
- `datetime.c` `parse_tz_suffix` & it's clients refactored
for better error detection & to simplify code:
- offset value post condition check is moved to `parse_tz_suffix`.
- this check uses tzoffset valid range instead of int16_t min/max.
- offset arg type of `parse_tz_suffix` fixed
to valid for TZoffset (int16_t).
- The better error detection lead to assertion fails of datetime tests
with decimal fraction of hours and minutes. So we need
tarantool/c-dt#3. It's the first way to fix the problem which
is mentioned in tarantool#12082.
Requires tarantool/c-dt#3
Closes tarantool#12082
NO_DOC=bugfix
FIXME: UPDATE c-dt submodule hash TO COMMIT FROM tarantool/c-dt
ligurio
reviewed
Dec 25, 2025
ligurio
left a comment
Member
There was a problem hiding this comment.
Thanks for the patch! Please see my comments.
ligurio
approved these changes
Mar 2, 2026
ligurio
left a comment
Member
There was a problem hiding this comment.
Evgeniy, thanks for your patience, and sorry for a huge delay with review!
LGTM
with a minor comment inline and nit below:
usually we add tags for tickets in commit message one per line, like below:
Needed for tarantool/tarantool#12082
Needed for tarantool/tarantool#12083
I propose to update the commit message. Feel free to ignore.
hh.hh & hhmm.mm parsing in dt_iso_parse.c implemented. Such formats are defined in ISO 8601-1:2019 (5.3.1.4). They are used in tarantool datetime tests. Needed for tarantool/tarantool#12082 Needed for tarantool/tarantool#12083
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hh.hh & hhmm.mm parsing in dt_iso_parse.c implemented.
Such formats are defined in ISO 8601-1:2019 (5.3.1.4).
They are used in tarantool datetime tests.
Needed for tarantool/tarantool#12082
Needed for tarantool/tarantool#12083