$ date --rfc-3339=seconds
2020-09-20 22:02:38+09:00
$
↑これ GNU coreutils なんですが、変じゃないですか? RFC 3339 だと日時の区切り文字は空白ではなく 'T' のはずなんですが……
Options for date (GNU Coreutils)
https://www.gnu.org/software/coreutils/manual/html_node/Options-for-date.html
> Display the date using a format specified by Internet RFC 3339. This is like --iso-8601, except that a space rather than a ‘T’ separates dates from times.
いやいやいや……
RFC 3339 - Date and Time on the Internet: Timestamps
https://tools.ietf.org/html/rfc3339
うーん……
> NOTE: ISO 8601 defines date and time separated by "T".
> Applications using this syntax may choose, for the sake of readability, to specify a full-date and full-time separated by (say) a space character.
これは NOTE であって規格で定義された文法で許されているものではないし、そもそも出力フォーマットをユーザが自由に操作できる date コマンドで敢えて RFC 3339 の名前を使って RFC 3339 非準拠の文字列を出力するんか? という話なんですよ
Re: bug in date: --rfc-3339=seconds and --rfc-3339=ns options do *not* o
https://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00025.html
> Here, "this syntax" refers to ISO 8601!
> I admit that the wording is odd, and I first interpreted it
wrong.
なんやねん、 RFC 3339 だと選択の余地なしで T 必要なんやんけ