3.2.3.3 Combined Time Formats

The following format directives print combinations of time and date components.

r

time, 12-hour (hh:mm:ss [AP]M)

T

time, 24-hour (hh:mm:ss.xxxxxxxxxx)

X

locale’s time representation (H:M:S). The seconds field includes a fractional part.

c

locale’s date and time in ctime format (Sat Nov 04 12:02:33 EST 1989). This format does not include any fractional part in the seconds field.

D

date (mm/dd/yy)

F

date (yyyy-mm-dd)

x

locale’s date representation (mm/dd/yy)

+

Date and time, separated by ’+’, for example ‘2004-04-28+22:22:05.0000000000’. The time is given in the current timezone (which may be affected by setting the TZ environment variable). This is a GNU extension. The seconds field includes a fractional part.