-
Notifications
You must be signed in to change notification settings - Fork 43
Add missed datetime information #4420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missed datetime information #4420
Conversation
Fixed typo in `input_string` and added default format string to description of `datetime.parse()`.
faa039e
to
18cb155
Compare
18cb155
to
bba7a5c
Compare
@@ -118,7 +118,7 @@ Functions | |||
- 0 | |||
|
|||
* - sec | |||
- Seconds. Value range: 0 - 60. | |||
- Seconds. Value range: 0 - 60. Leap second is supported, see a section :ref:`leap second <leap-second>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to section Leap second
doesn't work. Andrey, could you help please? @andreyaksenov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the following anchor before the Leap second
section:
.. _leap-second:
Leap second
-----------
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks!
@@ -263,9 +263,14 @@ Functions | |||
* RFC 3339 | |||
* extended `strftime <https://www.freebsd.org/cgi/man.cgi?query=strftime&sektion=3>`__ -- see description of the :ref:`format() <datetime-format>` for details. | |||
|
|||
By default fields that are not specified are equal to appropriate values in a Unix time. | |||
|
|||
Leap second is supported, see a section :ref:`leap second <leap-second>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to section Leap second
doesn't work. Andrey, could you help please? @andreyaksenov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments below.
|
||
This section describes how ``datetime`` module supports leap seconds: | ||
|
||
* Tarantool includes TZDB (also called ``tzdata``) and uses this database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm correct, we cannot say that TZDB is also called tzdata
. While TZDB is a collection of information about the world's time zones, tzdata
a specific package that contains the information from the TZDB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, TZDB is a database with information about timezones and tzdata
is a distribution package with other data (like leapsecond file), source code of programs and scripts. I'll fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paragraph was removed.
:ref:`datetime.now() <datetime-now>`, :ref:`datetime:set() <datetime-set>` | ||
accept a table with seconds equal to 60 seconds: | ||
|
||
.. code-block:: tarantoolsession |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please add the 4-spaces indent before
.. code-block:: tarantoolsession
and the entire code block (the same for all code blocks inside lists). - I'd remove all the examples after
datetime.new({ sec = 60 })
. Look a bit excessive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Limitations | ||
----------- | ||
|
||
The supported date range is from -5879610-06-22 to +5879611-07-11. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need the examples below? Adding examples for such corner cases is unnecessary in docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll remove it.
Leap second | ||
----------- | ||
|
||
Coordinated Universal Time (UTC) is based on International Atomic Time (TAI). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, such detailed info about the leap second looks excessive for Tarantool docs. Can we make a short intro about TZDB in general and the leap seconds in particular, give a link to the external resource, and then jump right to the point (which is how all of these apply to Tarantool)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
for a correct time zones support. Use Lua module :doc:`/reference/reference_lua/tarantool` | ||
to get a used version of ``tzdata``: | ||
|
||
Since: :doc:`3.2.0 </release/3.2.0>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since
between the description and example looks weird. Ideally, we should describe all the fields in the Module tarantool docs and add the Since
info there. As a workaround, let's update the previous sentence like this:
Since :doc:`3.2.0 </release/3.2.0>`, you can use the Lua module ....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated:
--- a/doc/reference/reference_lua/datetime.rst
+++ b/doc/reference/reference_lua/datetime.rst
@@ -1082,10 +1082,9 @@ implement the time zones support properly.
This section describes how ``datetime`` module supports leap seconds:
* Tarantool includes TZDB (also called ``tzdata``) and uses this database
- for a correct time zones support. Use the Lua module :ref:`tarantool <tarantool-module>`
- to get a used version of ``tzdata``:
-
- Since: :doc:`3.2.0 </release/3.2.0>`
+ for a correct time zones support. Since :doc:`3.2.0 </release/3.2.0>`,
+ you can use the Lua module :ref:`tarantool <tarantool-module>` to get
+ a used version of ``tzdata``:
.. code-block:: tarantoolsession
but I've removed this paragraph for now, I'll add it in scope of doc request from #10387.
f5c00c1
to
1fe8ca2
Compare
8f71c4c
to
6bd7ca0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM
the Earth's rotation speed varies in response to climatic and geological events, | ||
and due to this, UTC leap seconds are irregularly spaced and unpredictable. | ||
|
||
This section describes how ``datetime`` module supports leap seconds: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section describes how ``datetime`` module supports leap seconds: | |
This section describes how the ``datetime`` module supports leap seconds: |
Leap second was introduced in commit "datetime, lua: interval arithmetics" [1]. Fixes #4409 1. tarantool/tarantool@b0463da
59f8ab9
to
ff058d7
Compare
Added a section with useful links.
`strptime` is a function, not a library.
ff058d7
to
a93eb89
Compare
Staging: https://docs.d.tarantool.io/en/doc/gh-xxxx-missed-datetime-information/reference/reference_lua/datetime/