From bebdfc468e7808704f724e58eaca0c994595dcde Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 9 Jun 2020 20:57:06 +0300 Subject: Add date builtin description to Testscript manual --- doc/testscript.cli | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') 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] [+] +\ + +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{}\b{N]}} where \ci{} 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}| \ -- cgit v1.1