mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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
This commit is contained in:
parent
7f3d08b255
commit
20bc8c1e97
3 changed files with 28 additions and 6 deletions
|
@ -528,6 +528,11 @@ time_and_date(void)
|
|||
test("0119-00-04T15:32:23", "%ptTr", &t);
|
||||
test("15:32:23|2019-01-04", "%ptTt|%ptTd", &t, &t);
|
||||
test("15:32:23|0119-00-04", "%ptTtr|%ptTdr", &t, &t);
|
||||
|
||||
test("2019-01-04 15:32:23", "%ptTs", &t);
|
||||
test("0119-00-04 15:32:23", "%ptTsr", &t);
|
||||
test("15:32:23|2019-01-04", "%ptTts|%ptTds", &t, &t);
|
||||
test("15:32:23|0119-00-04", "%ptTtrs|%ptTdrs", &t, &t);
|
||||
}
|
||||
|
||||
static void __init
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue