date.1 (57803) | date.1 (59175) |
---|---|
1.\" Copyright (c) 1980, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)date.1 8.3 (Berkeley) 4/28/95 | 1.\" Copyright (c) 1980, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)date.1 8.3 (Berkeley) 4/28/95 |
36.\" $FreeBSD: head/bin/date/date.1 57803 2000-03-07 20:54:17Z sheldonh $ | 36.\" $FreeBSD: head/bin/date/date.1 59175 2000-04-12 13:35:17Z brian $ |
37.\" 38.Dd November 17, 1993 39.Dt DATE 1 40.Os 41.Sh NAME 42.Nm date 43.Nd display or set date and time 44.Sh SYNOPSIS --- 93 unchanged lines hidden (view full) --- 138.Ar val . 139If 140.Ar val 141is preceded with a plus or minus sign, the date is adjusted forwards 142or backwards according to the remaining string, otherwise the relevant 143part of the date is set. The date can be adjusted as many times as 144required using these flags. Flags are processed in the order given. 145.Pp | 37.\" 38.Dd November 17, 1993 39.Dt DATE 1 40.Os 41.Sh NAME 42.Nm date 43.Nd display or set date and time 44.Sh SYNOPSIS --- 93 unchanged lines hidden (view full) --- 138.Ar val . 139If 140.Ar val 141is preceded with a plus or minus sign, the date is adjusted forwards 142or backwards according to the remaining string, otherwise the relevant 143part of the date is set. The date can be adjusted as many times as 144required using these flags. Flags are processed in the order given. 145.Pp |
146Seconds are in the range 0-59, minutes are in the range 0-59, hours are | 146When setting values 147.Pq rather than adjusting them , 148seconds are in the range 0-59, minutes are in the range 0-59, hours are |
147in the range 1-12, month days are in the range 1-31, week days are in the 148range 0-6 149.Pq Sun-Sat , 150months are in the range 1-12 151.Pq Jan-Dec 152and years are in the range 80-38 or 1980-2038. 153.Pp 154If --- 14 unchanged lines hidden (view full) --- 169.Pq or minus 170sign, the date will be put forwards 171.Pq or backwards 172to the next 173.Pq previous 174date that matches the given week day or month. This will not adjust the date 175if the given week day or month is the same as the current one. 176.Pp | 149in the range 1-12, month days are in the range 1-31, week days are in the 150range 0-6 151.Pq Sun-Sat , 152months are in the range 1-12 153.Pq Jan-Dec 154and years are in the range 80-38 or 1980-2038. 155.Pp 156If --- 14 unchanged lines hidden (view full) --- 171.Pq or minus 172sign, the date will be put forwards 173.Pq or backwards 174to the next 175.Pq previous 176date that matches the given week day or month. This will not adjust the date 177if the given week day or month is the same as the current one. 178.Pp |
179When a date is adjusted to a specific value or in units greater than hours, 180daylight savings time considerations are ignored. 181Adjustments in units of hours or less honour daylight savings time. 182So, assuming the current date is March 26, 0:30 and that the DST adjustment 183means that the clock goes forward at 01:00 to 02:00, using 184.Fl v No +1H 185will adjust the date to March 26, 2:30. 186Likewise, if the date is October 29, 0:30 and the DST adjustment means that 187the clock goes back at 02:00 to 01:00, using 188.Fl v No +3H 189will be necessary to reach October 20, 2:30. 190.Pp 191When the date is adjusted to a specific value that doesn't actually exist 192.Pq for example March 26, 1:30 BST 2000 , 193the date will be silently adjusted forwards in units of one hour until it 194reaches a valid time. 195When the date is adjusted to a specific value that occurs twice 196.Pq for example October 29, 1:30 2000 , 197the resulting timezone will be set so that the date matches the earlier of 198the two times. 199.Pp |
|
177Refer to the examples below for further details. 178.El 179.Pp 180An operand with a leading plus 181.Pq Dq \&+ 182sign signals a user-defined format string which specifies the format in 183which to display the date and time. The format string may contain any of 184the conversion specifications described in the --- 165 unchanged lines hidden --- | 200Refer to the examples below for further details. 201.El 202.Pp 203An operand with a leading plus 204.Pq Dq \&+ 205sign signals a user-defined format string which specifies the format in 206which to display the date and time. The format string may contain any of 207the conversion specifications described in the --- 165 unchanged lines hidden --- |