Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1661538
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt |
| Date | 2017-06-08 20:10 +0200 |
| Message-ID | <tQa2C-7DP-5@gated-at.bofh.it> (permalink) |
| References | <tQ5Z1-4WL-35@gated-at.bofh.it> <tQ5Z1-4WL-37@gated-at.bofh.it> <tQ6V4-5vT-19@gated-at.bofh.it> <tQ74K-5AT-7@gated-at.bofh.it> <tQ7Ht-63v-55@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Jun 8, 2017 at 6:33 PM, Arnd Bergmann <arnd@arndb.de> wrote: > On Thu, Jun 8, 2017 at 4:55 PM, Andy Shevchenko > <andy.shevchenko@gmail.com> wrote: >> On Thu, Jun 8, 2017 at 5:49 PM, Arnd Bergmann <arnd@arndb.de> wrote: >>> On Thu, Jun 8, 2017 at 3:47 PM, Andy Shevchenko >>> <andriy.shevchenko@linux.intel.com> wrote: >>> I really like the idea, and the implementation seems fine for this use case, but >>> before we reserve %pt for rtc_time, could we discuss whether we want >>> that for printing struct tm, struct timespec64, time64_t or ktime_t instead? >> >> How many users? > > It's hard to predict, I would assume we get more users once there is an > easy way to print the time. So, at least for now we can guess using existing users, right? I don't check yet how to calculate those cases of time64_t, timespec64, ktime_t and alike if they are about pretty ptintong time and date. I'm speculating that there are (almost) none. >> For struct tm it's somelike 4 (which want to print its content). > > Good point. I notice that they all convert from time64_t or time_t into > struct tm immediately before printing it, so we can scratch that one > as long as there is a way to pretty-print a time64_t. We also don't > need to print a time_t as we want to kill that one off anyway. > > If we only care about printing time64_t and rtc_time, we can easily > use %pT for one and %pt for the other, but there may still be good > reasons to print a timespec64 or ktime_t. No need, we may still use 3rd/4th letter in the format for that. %pt(t/d) time/date + whatever modifications, like raw, validate, timespec, etc. 's' for timespec64, for example. -- With Best Regards, Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-06-08 15:50 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Arnd Bergmann <arnd@arndb.de> - 2017-06-08 16:50 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 17:00 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-08 17:10 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 20:00 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 20:50 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2017-06-08 22:50 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 23:30 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Arnd Bergmann <arnd@arndb.de> - 2017-06-08 23:50 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-08 20:50 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Arnd Bergmann <arnd@arndb.de> - 2017-06-08 17:40 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Joe Perches <joe@perches.com> - 2017-06-08 17:50 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 20:10 +0200
Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Joe Perches <joe@perches.com> - 2017-06-09 01:10 +0200
csiph-web