Follow

date +"%Y-%m-%d%t%H:%M:%S"
Should be the default.

@pro do you suggest a space? Just seemed like a logical divider and I don't like using multiple spaces...

@Diptchip Yes, I think the space is better where humans can see it. Tab may be suitable for computer-parsed data, a CSV with tab replacing commas, for example. Even then, imagine a possibility of getting the tab-containing date string getting into a tab-separated output of a script.

@Diptchip Well:

% LC_TIME=en_DK.UTF-8 date 2021-09-28T04:24:40 CEST % LC_TIME=en_US.UTF-8 date Tue 28 Sep 2021 04:24:43 AM CEST % LC_TIME=C.UTF-8 date Tue Sep 28 04:28:31 2021

With glibc’s locales and my own version of date(1) which uses +%c as default, as how things should be. (screw POSIX for writing that +%a %b %e %H:%M:%S %Z %Y should be the default)

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.