Skip to content
Snippets Groups Projects
Commit 72c3376f authored by Sergey Bronnikov's avatar Sergey Bronnikov Committed by Sergey Kaplun
Browse files

datetime: forbid non-integers in :set() and parse()

The patch forbids using non-integer values in datetime's `:set()`
for `year`, `month`, `day`, `hour`, `min`, `sec`, `usec`, `msec`
and `nsec` keys. The type of `tzoffset` can be integer or string,
`timestamp` can be double, and integer values allowed in timestamp
if `nsec`, `usec`, or `msecs` provided. An error will be raised
when a value of incorrect type is passed.

Part of #10391

@TarantoolBot document
Title: Update types of values passed to `:set()` and parse()

`:set()` can accept only integer values for `year`, `month`,
`day`, `hour`, `min`, `sec`, `usec`, `msec` and `nsec`.
The type of `tzoffset` can be integer or string, `timestamp` can
be integer or double. `tzoffset` passed to `datetime.parse()`
can be integer or string.

(cherry picked from commit 6e77907baa3cbeebc79241cc0046a539a09e3f2c)
parent 29be5eb3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment