Systemwide RFC-3339 Dateformat

From Gentoo Wiki
Jump to:navigation Jump to:search

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.

Comparison of date standards
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"

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'.


FILE ~/.profile.profile
# Localization 
TIME_STYLE=long-iso #for ISO Date in ls"


FILE ~/.zshrc.zshrc
# Localization 
TIME_STYLE=long-iso #for ISO Date in ls"

xfce panel clock

FILE .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xmlxfce panel clock with T
<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"/>
FILE .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xmlxfce panel clock with space
<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"/>