diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-06-09 20:57:06 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-06-11 15:41:48 +0300 |
commit | bebdfc468e7808704f724e58eaca0c994595dcde (patch) | |
tree | 3dc5bbb2c49594bea97f58359f8ae52f421550e6 /doc | |
parent | 4c51fd7062a7e1c34deed9a7e9f1e87239a2e38c (diff) |
Add date builtin description to Testscript manual
Diffstat (limited to 'doc')
-rw-r--r-- | doc/testscript.cli | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/testscript.cli b/doc/testscript.cli index 43be258..c0f0d4e 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -2362,6 +2362,35 @@ directories that are inside the script working directory are automatically registered for cleanup. +\h#builtins-date|\c{date}| + +\ +date [-u] [+<format>] +\ + +Print the local time or, if the \c{-u} option is specified, the Coordinated +Universal Time (UTC) in the specified format. + +The optional \i{format} argument is the \c{std::put_time()} C++11 +manipulator's format string that in addition supports the nanoseconds +specifier in the form \c{\b{%[}\i{<d>}\b{N]}} where \ci{<d>} is the optional +single delimiter character, for example \c{.}. If the nanoseconds part is 0, +then it is not printed (nor the delimiter character). Otherwise, the +nanoseconds part is padded to 9 characters with leading zeros. + +Note that this builtin's format specifier set is a superset of the POSIX +\c{date} utility. + +If the \i{format} argument is not specified, then +\c{%a\ %b\ %e\ %H:%M:%S\ %Z\ %Y} is used by default. + +\dl| + +\li|\n\c{-u|--utc} + + Print Coordinated Universal Time (UTC).|| + + \h#builtins-diff|\c{diff}| \ |