Systemwide RFC-3339 Dateformat
From Gentoo Wiki
RFC-3339 date format and its friends
The RFC-3339 standard is available for free in the public and widely used for software. The ISO 8601 standard is very similar, but requires the 'T' between the day and the hours. RFC-3339 allows to use a space or the 'T' respectively.
Example | Allowed in Standard | date command |
---|---|---|
2023-08-13 | RFC-3339, ISO_8601 | user $ date --rfc-3339='date' |
2023-08-13T16:07:54+02:00 | RFC-3339, ISO_8601 | user $ date --iso-8601='seconds' |
2023-08-13 16:08:44+02:00 | RFC-3339 | user $ date --rfc-3339='seconds' |
2023-08-13 16:08:44 +02:00 | RFC-3339 | user $ date "+%F %T %:z" |
2023-08-13 16:08:44 | - | user $ date "+%F %T" |
- stackoverflow: What's the difference between ISO 8601 and RFC 3339 Date Formats?
- comparison between RFC 3339 and ISO 8601 https://ijmacd.github.io/rfc3339-iso8601/
System wide RFC-3339 date
Several configuration files need adjustments to achieve a system wide RFC-3339 date representation. Here we focus on the representation with space instead of 'T'.
.profile
# Localization
TIME_STYLE=long-iso #for ISO Date in ls"
zsh
# Localization
TIME_STYLE=long-iso #for ISO Date in ls"
xfce panel clock
<property name="digital-format" type="string" value="%Y-%m-%dT%H:%M %:z"/>
<property name="digital-time-format" type="string" value="%Y-%m-%dT%H:%M %:z"/>
<property name="digital-format" type="string" value="%Y-%m-%d %H:%M %:z"/>
<property name="digital-time-format" type="string" value="%Y-%m-%d %H:%M %:z"/>