Ran
|
Jobs
1
|
Files
479
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
push
github
datetime: fix values of unspecified fields in dt.parse() datetime object can be created using `datetime.new()` and `datetime.parse()`. `datetime.new()` sets values of unspecified fields to appropriate values of fields in a Unix time (00:00:00 UTC on 1 January 1971, Thursday), see commit 43e10ed34949 ("build, lua: built-in module datetime"): ``` tarantool> datetime.new() --- - 1970-01-01T00:00:00Z ... tarantool> datetime.new():totable() --- - sec: 0 min: 0 yday: 1 day: 1 nsec: 0 isdst: false wday: 5 tzoffset: 0 month: 1 year: 1970 hour: 0 ``` The function `datetime.parse` converts an input string with the date and time information into a datetime object. When fields are not specified in a input string their values becomes undefined: ``` tarantool> dt.parse('01:01:01', {format ='%H:%M:%S'}):totable() --- - sec: -59 min: -58 yday: 366 day: 31 nsec: 0 isdst: false wday: 1 tzoffset: 0 month: 12 year: 0 hour: -22 ... tarantool> ``` The commit fixes aforementioned behaviour of `datetime.parse()` by setting values for fields not specified by user to values of appropriate fields of Unix time. NO_DOC=bugfix Fixes #8588 (cherry picked from commit 9ac56a122)
62943 of 114082 branches covered (55.17%)
2 of 2 new or added lines in 1 file covered. (100.0%)
43 existing lines in 10 files now uncovered.93788 of 109146 relevant lines covered (85.93%)
2601603.7 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
96.55 |
-1.15% | src/histogram.c |
1 |
89.95 |
-0.08% | src/box/applier.cc |
1 |
92.39 |
0.05% | src/box/vinyl.c |
1 |
94.52 |
-0.15% | src/box/vy_tx.c |
2 |
87.27 |
0.53% | src/box/box.cc |
2 |
88.69 |
-0.33% | src/box/vy_lsm.c |
4 |
94.19 |
-0.57% | src/lib/core/datetime.c |
5 |
90.54 |
-0.32% | src/box/memtx_engine.cc |
11 |
86.34 |
-6.01% | src/lib/salad/mhash.h |
15 |
91.49 |
-2.5% | src/box/memtx_space.c |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 10284341591.1 | 479 |
85.93 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|