summaryrefslogtreecommitdiffstats
path: root/bin/date/date.1
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2000-04-12 13:35:17 +0000
committerbrian <brian@FreeBSD.org>2000-04-12 13:35:17 +0000
commit0f8e1924fb0fd9657f280fe5dbdca99e0f9b5af5 (patch)
treedcfbc59962db287238611455a27a67cece2d555f /bin/date/date.1
parent989ac2d698d83afd2733194fad8ca1cb98aaa61c (diff)
downloadFreeBSD-src-0f8e1924fb0fd9657f280fe5dbdca99e0f9b5af5.zip
FreeBSD-src-0f8e1924fb0fd9657f280fe5dbdca99e0f9b5af5.tar.gz
Change -v so that variences in units of days or less are sensitive to
DST. Explain in more detail what date -v does when mixed with DST. Previous code suggested broken by: wollman
Diffstat (limited to 'bin/date/date.1')
-rw-r--r--bin/date/date.125
1 files changed, 24 insertions, 1 deletions
diff --git a/bin/date/date.1 b/bin/date/date.1
index 955505f..650a871 100644
--- a/bin/date/date.1
+++ b/bin/date/date.1
@@ -143,7 +143,9 @@ or backwards according to the remaining string, otherwise the relevant
part of the date is set. The date can be adjusted as many times as
required using these flags. Flags are processed in the order given.
.Pp
-Seconds are in the range 0-59, minutes are in the range 0-59, hours are
+When setting values
+.Pq rather than adjusting them ,
+seconds are in the range 0-59, minutes are in the range 0-59, hours are
in the range 1-12, month days are in the range 1-31, week days are in the
range 0-6
.Pq Sun-Sat ,
@@ -174,6 +176,27 @@ to the next
date that matches the given week day or month. This will not adjust the date
if the given week day or month is the same as the current one.
.Pp
+When a date is adjusted to a specific value or in units greater than hours,
+daylight savings time considerations are ignored.
+Adjustments in units of hours or less honour daylight savings time.
+So, assuming the current date is March 26, 0:30 and that the DST adjustment
+means that the clock goes forward at 01:00 to 02:00, using
+.Fl v No +1H
+will adjust the date to March 26, 2:30.
+Likewise, if the date is October 29, 0:30 and the DST adjustment means that
+the clock goes back at 02:00 to 01:00, using
+.Fl v No +3H
+will be necessary to reach October 20, 2:30.
+.Pp
+When the date is adjusted to a specific value that doesn't actually exist
+.Pq for example March 26, 1:30 BST 2000 ,
+the date will be silently adjusted forwards in units of one hour until it
+reaches a valid time.
+When the date is adjusted to a specific value that occurs twice
+.Pq for example October 29, 1:30 2000 ,
+the resulting timezone will be set so that the date matches the earlier of
+the two times.
+.Pp
Refer to the examples below for further details.
.El
.Pp
OpenPOWER on IntegriCloud