• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 10252947178
88%

Build:
DEFAULT BRANCH: master
Ran 05 Aug 2024 05:14PM UTC
Jobs 1
Files 514
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Aug 2024 05:00PM UTC coverage: 87.184% (+0.02%) from 87.166%
10252947178

push

github

Buristan
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

68229 of 121503 branches covered (56.15%)

2 of 2 new or added lines in 1 file covered. (100.0%)

31 existing lines in 14 files now uncovered.

100869 of 115697 relevant lines covered (87.18%)

2434156.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10252947178.1 05 Aug 2024 05:14PM UTC 0
87.18
GitHub Action Run
Source Files on build 10252947178
Detailed source file information is not available for this build.
  • Back to Repo
  • 9ac56a12 on github
  • Prev Build on master (#10248270925)
  • Next Build on master (#10253814512)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc