Bug 24773

Summary: the -v flag of the date command does not work quite as expected
Product: Base System Reporter: adsouza <adsouza>
Component: binAssignee: dd <dd>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description adsouza 2001-02-01 04:30:00 UTC
When I try to use the following line to change the current day of my system time, it has no effect:
date -v +3d

How-To-Repeat: try to alter the date with the d modifier of the -v option in the date utility
Comment 1 dima 2001-02-01 04:46:28 UTC
> When I try to use the following line to change the current day of my
> system time, it has no effect:
> date -v +3d

It's not supposed to change the date.  Perhaps the manual page is a
little confusing.  What it does is display the date after the
modifications you requested.  For example:

	      dima@hornet% date
	      Wed Jan 31 20:39:58 PST 2001
	      dima@hornet% date -v +3d
	      Sat Feb  3 20:40:01 PST 2001

The second is is three days (and some seconds, obviously) ahead.
That's what -v does.  It doesn't actually change your system's
perception of the current date.

I'd fix the manual page, but I'm not sure exactly how to word it.
"Adjust" is correct, it just has the implication that it will also set
it after adjusting it.

Hope this helps

					Dima Dorfman
					dima@unixfreak.org
Comment 2 dd freebsd_committer freebsd_triage 2001-03-16 02:20:25 UTC
State Changed
From-To: open->suspended

I've fixed the man page in -current; will MFC after code freeze. 


Comment 3 dd freebsd_committer freebsd_triage 2001-03-16 02:20:25 UTC
Responsible Changed
From-To: freebsd-bugs->dd

My MFC reminder.
Comment 4 dd freebsd_committer freebsd_triage 2001-04-26 03:16:02 UTC
State Changed
From-To: suspended->closed

MFC'd.