date.1 (1558B)
1 .Dd 2015-10-08 2 .Dt DATE 1 3 .Os sbase 4 .Sh NAME 5 .Nm date 6 .Nd print or set date and time 7 .Sh SYNOPSIS 8 .Nm 9 .Op Fl d Ar time 10 .Op Fl u 11 .Oo 12 .Cm + Ns Ar format | 13 .Sm off 14 .Ar mmddHHMM Oo Oo Ar CC Oc Ar yy Oc 15 .Sm on 16 .Oc 17 .Sh DESCRIPTION 18 .Nm 19 prints the date and time according to 20 .Xr locale 7 21 or 22 .Ar format 23 using 24 .Xr strftime 3 25 or sets the date. 26 .Sh OPTIONS 27 .Bl -tag -width Ds 28 .It Fl d Ar time 29 Print 30 .Ar time 31 given as the number of seconds since the 32 Unix epoch 1970-01-01T00:00:00Z. 33 .It Fl u 34 Print or set UTC time instead of local time. 35 .El 36 .Pp 37 An operand with a leading plus 38 .Pq Cm + 39 sign signals a user-defined format string using 40 .Xr strftime 3 41 conversion specifications. 42 .Pp 43 An operand without a leading plus sign is interpreted as a value 44 for setting the system's current date and time. The canonical 45 representation for setting the date and time is: 46 .Pp 47 .Bl -tag -width Ds -compact -offset indent 48 .It Ar mm 49 The month of the year, from 01 to 12. 50 .It Ar dd 51 The day of the month, from 01 to 31. 52 .It Ar HH 53 The hour of the day, from 00 to 23. 54 .It Ar MM 55 The minute of the hour, from 00 to 59. 56 .It Ar CC 57 The first two digits of the year (the century). 58 .It Ar yy 59 The second two digits of the year. 60 If 61 .Ar yy 62 is specified, but 63 .Ar CC 64 is not, a value for 65 .Ar yy 66 between 69 and 99 results in a 67 .Ar CC 68 value of 19. Otherwise, a 69 .Ar CC 70 value of 20 is used. 71 .El 72 .Pp 73 The century and year are optional. The default is the current year. 74 .Sh STANDARDS 75 The 76 .Nm 77 utility is compliant with the 78 .St -p1003.1-2013 79 specification. 80 .Pp 81 The 82 .Op Fl d 83 flag is an extension to that specification.