diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-05-11 18:39:55 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2021-05-17 12:01:26 +0200 |
commit | 20bc8c1e972f29afcac85e524e430c11a6df5f58 (patch) | |
tree | fc428e2db30dba9fcc042df0862d88824b754b94 /Documentation/core-api | |
parent | 7f3d08b255d1806502e45fe70ca2ba9646eb3aa1 (diff) |
lib/vsprintf: Allow to override ISO 8601 date and time separator
ISO 8601 defines 'T' as a separator between date and time. Though,
some ABIs use time and date with ' ' (space) separator instead.
Add a flavour to the %pt specifier to override default separator.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210511153958.34527-1-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'Documentation/core-api')
-rw-r--r-- | Documentation/core-api/printk-formats.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst index 9be6de402cb9..7b6bfd8a78d3 100644 --- a/Documentation/core-api/printk-formats.rst +++ b/Documentation/core-api/printk-formats.rst @@ -514,9 +514,10 @@ Time and date :: %pt[RT] YYYY-mm-ddTHH:MM:SS + %pt[RT]s YYYY-mm-dd HH:MM:SS %pt[RT]d YYYY-mm-dd %pt[RT]t HH:MM:SS - %pt[RT][dt][r] + %pt[RT][dt][r][s] For printing date and time as represented by:: @@ -528,6 +529,10 @@ in human readable format. By default year will be incremented by 1900 and month by 1. Use %pt[RT]r (raw) to suppress this behaviour. +The %pt[RT]s (space) will override ISO 8601 separator by using ' ' (space) +instead of 'T' (Capital T) between date and time. It won't have any effect +when date or time is omitted. + Passed by reference. struct clk |