mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
lib/vsprintf: Print time and date in human readable format via %pt
There are users which print time and date represented by content of struct rtc_time in human readable format. Instead of open coding that each time introduce %ptR[dt][r] specifier. Cc: Arnd Bergmann <arnd@arndb.de> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jason Wessel <jason.wessel@windriver.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Jonathan Hunter <jonathanh@nvidia.com> Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Petr Mladek <pmladek@suse.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
8c4cf161a8
commit
4d42c44727
3 changed files with 176 additions and 3 deletions
|
@ -412,6 +412,24 @@ Examples::
|
|||
|
||||
Passed by reference.
|
||||
|
||||
Time and date (struct rtc_time)
|
||||
-------------------------------
|
||||
|
||||
::
|
||||
|
||||
%ptR YYYY-mm-ddTHH:MM:SS
|
||||
%ptRd YYYY-mm-dd
|
||||
%ptRt HH:MM:SS
|
||||
%ptR[dt][r]
|
||||
|
||||
For printing date and time as represented by struct rtc_time structure in
|
||||
human readable format.
|
||||
|
||||
By default year will be incremented by 1900 and month by 1. Use %ptRr (raw)
|
||||
to suppress this behaviour.
|
||||
|
||||
Passed by reference.
|
||||
|
||||
struct clk
|
||||
----------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue