a2p
accept
access
acct
addftinfo
addr2line
adjtime
afmtodit
after
aio_cancel
aio_error
aio_read
aio_return
aio_suspend
aio_waitcomplete
aio_write
alias
aliases
alloc
anvil
append
apply
apropos
ar
array
as
asa
asn1parse
at
atq
atrm
attemptckalloc
attemptckrealloc
authlib
authtest
autopoint
awk
b64decode
b64encode
basename
batch
bc
bdes
bell
bg
bgerror
biff
big5
binary
bind
bindkey
bindtags
bindtextdomain
bio
bitmap
blowfish
bn
bootparams
bootptab
bounce
brandelf
break
breaksw
brk
bsdiff
bsdtar
bsnmpd
bspatch
bthost
btsockstat
buffer
builtin
builtins
bunzip2
button
byacc
bzcat
bzegrep
bzfgrep
bzgrep
bzip2
c2ph
c89
c99
ca
cal
calendar
canvas
cap_mkdb
case
cat
catch
catman
cc
cd
cdcontrol
chdir
checkbutton
checknr
chflags
chfn
chgrp
chio
chkey
chmod
chown
chpass
chroot
chsh
ci
ciphers
ckalloc
ckdist
ckfree
ckrealloc
cksum
cleanup
clear
clipboard
clock
clock_getres
clock_gettime
clock_settime
close
cmp
co
col
colcrt
colldef
colors
colrm
column
comm
command
compile_et
complete
compress
concat
config
connect
console
continue
core
courierlogger
couriertcpd
cp
cpan
cpio
cpp
creat
crl
crontab
crunchgen
crunchide
crypt
crypto
csh
csplit
ctags
ctm
ctm_dequeue
ctm_rmail
ctm_smail
cu
cursor
cursors
cut
cvs
date
dbiprof
dbiproxy
dc
dcgettext
dcngettext
dd
dde
default
defer
deliverquota
des
destroy
devfs
df
dgettext
dgst
dh
dhparam
dialog
diff
diff3
dig
dir
dirent
dirname
dirs
discard
disktab
dngettext
do
domainname
done
dprofpp
dsa
dsaparam
dtmfdecode
du
dup
dup2
eaccess
ec
ecdsa
echo
echotc
ecparam
ed
edit
editrc
ee
egrep
elf
elfdump
elif
else
enc
enc2xs
encoding
end
endif
endsw
engine
enigma
entry
env
envsubst
eof
eqn
err
errno
error
errstr
esac
ethers
euc
eui64
eval
event
evp
ex
exec
execve
exit
expand
export
exports
expr
extattr
extattr_delete_fd
extattr_delete_file
extattr_get_fd
extattr_get_file
extattr_set_fd
extattr_set_file
f77
false
famm
famx
fblocked
fbtab
fc
fchdir
fchflags
fchmod
fchown
fcntl
fconfigure
fcopy
fdescfs
fdformat
fdread
fdwrite
fetch
fg
fgrep
fhopen
fhstat
fhstatfs
fi
file
file2c
fileevent
filename
filetest
find
find2perl
finger
flex
flock
flush
fmt
focus
fold
font
fontedit
for
foreach
fork
format
forward
fpathconf
frame
from
fs
fstab
fstat
fstatfs
fsync
ftp
ftpchroot
ftpusers
ftruncate
futimes
g711conv
gb2312
gb18030
gbk
gcc
gcore
gcov
gdb
gencat
gendsa
genrsa
gensnmptree
getconf
getdents
getdirentries
getdtablesize
getegid
geteuid
getfacl
getfh
getfsstat
getgid
getgroups
getitimer
getlogin
getopt
getopts
getpeername
getpgid
getpgrp
getpid
getppid
getpriority
getresgid
getresuid
getrlimit
getrusage
gets
getsid
getsockname
getsockopt
gettext
gettextize
gettimeofday
gettytab
getuid
glob
global
gmake
goto
gperf
gprof
grab
grep
grid
grn
grodvi
groff
groff_font
groff_out
groff_tmac
grog
grolbp
grolj4
grops
grotty
group
groups
gunzip
gzcat
gzexe
gzip
h2ph
h2xs
hash
hashstat
hd
head
help2man
hesinfo
hexdump
history
host
hostname
hosts
hosts_access
hosts_options
hpftodit
http
hup
i386_get_ioperm
i386_get_ldt
i386_set_ioperm
i386_set_ldt
i386_vm86
iconv
id
ident
idprio
if
ifnames253
ifnames259
image
imapd
incr
indent
indxbib
info
infokey
inode
install
instmodsh
interp
intro
introduction
ioctl
ipcrm
ipcs
ipf
ipftest
ipnat
ippool
ipresend
issetugid
jail
jail_attach
jobid
jobs
join
jot
kbdcontrol
kbdmap
kcon
kdestroy
kdump
kenv
kevent
keycap
keylogin
keylogout
keymap
keysyms
kgdb
kill
killall
killpg
kinit
kldfind
kldfirstmod
kldload
kldnext
kldstat
kldsym
kldunload
klist
kpasswd
kqueue
kse
kse_create
kse_exit
kse_release
kse_switchin
kse_thr_interrupt
kse_wakeup
ktrace
label
labelframe
lam
lappend
last
lastcomm
lastlog
lchflags
lchmod
lchown
ld
ldap
ldapadd
ldapcompare
ldapdelete
ldapmodify
ldapmodrdn
ldappasswd
ldapsearch
ldapwhoami
ldd
leave
less
lesskey
lex
lgetfh
lhash
libnetcfg
library
limit
limits
lindex
link
linprocfs
linsert
lint
lio_listio
list
listbox
listen
lj4_font
lkbib
llength
lmtp
ln
load
loadfont
local
locale
locate
lock
lockf
log
logger
login
logins
logname
logout
look
lookbib
lorder
lower
lp
lpq
lpr
lprm
lptest
lrange
lreplace
ls
lsearch
lseek
lset
lsort
lstat
lsvfs
lutimes
lynx
m4
madvise
magic
mail
maildiracl
maildirkw
maildirmake
mailq
mailx
make
makeinfo
makewhatis
man
manpath
master
mc
mcedit
mcview
md2
md4
md5
mdc2
memory
menu
menubar
menubutton
merge
mesg
message
mincore
minherit
minigzip
mkdep
mkdir
mkfifo
mkimapdcert
mklocale
mknod
mkpop3dcert
mkstr
mktemp
mlock
mlockall
mmap
mmroff
modfind
modfnext
modnext
modstat
moduli
more
motd
mount
mprotect
mptable
msdos
msdosfs
msgattrib
msgcat
msgcmp
msgcomm
msgconv
msgen
msgexec
msgfilter
msgfmt
msggrep
msginit
msgmerge
msgs
msgunfmt
msguniq
mskanji
msql2mysql
msync
mt
munlock
munlockall
munmap
mv
myisamchk
myisamlog
myisampack
mysql
mysqlaccess
mysqladmin
mysqlbinlog
mysqlcheck
mysqld
mysqldump
mysqld_multi
mysqld_safe
mysqlhotcopy
mysqlimport
mysqlshow
mysql_config
mysql_fix_privilege_tables
mysql_zap
namespace
nanosleep
nawk
nc
ncal
ncplist
ncplogin
ncplogout
neqn
netconfig
netgroup
netid
netstat
networks
newaliases
newgrp
nex
nfsstat
nfssvc
ngettext
nice
nl
nm
nmount
nohup
nologin
notify
nroff
nseq
nslookup
ntp_adjtime
ntp_gettime
nvi
nview
objcopy
objdump
objformat
ocsp
od
onintr
open
openssl
opieaccess
opieinfo
opiekey
opiekeys
opiepasswd
option
options
oqmgr
pack
package
packagens
pagesize
palette
pam_auth
panedwindow
parray
passwd
paste
patch
pathchk
pathconf
pawd
pax
pbm
pcre
pcreapi
pcrebuild
pcrecallout
pcrecompat
pcrecpp
pcregrep
pcrematching
pcrepartial
pcrepattern
pcreperform
pcreposix
pcreprecompile
pcresample
pcretest
perl
perl56delta
perl58delta
perl561delta
perl570delta
perl571delta
perl572delta
perl573delta
perl581delta
perl582delta
perl583delta
perl584delta
perl585delta
perl586delta
perl587delta
perl588delta
perl5004delta
perl5005delta
perlaix
perlamiga
perlapi
perlapio
perlapollo
perlartistic
perlbeos
perlbook
perlboot
perlbot
perlbs2000
perlbug
perlcall
perlcc
perlce
perlcheat
perlclib
perlcn
perlcompile
perlcygwin
perldata
perldbmfilter
perldebguts
perldebtut
perldebug
perldelta
perldgux
perldiag
perldoc
perldos
perldsc
perlebcdic
perlembed
perlepoc
perlfaq
perlfaq1
perlfaq2
perlfaq3
perlfaq4
perlfaq5
perlfaq6
perlfaq7
perlfaq8
perlfaq9
perlfilter
perlfork
perlform
perlfreebsd
perlfunc
perlglossary
perlgpl
perlguts
perlhack
perlhist
perlhpux
perlhurd
perlintern
perlintro
perliol
perlipc
perlirix
perlivp
perljp
perlko
perllexwarn
perllinux
perllocale
perllol
perlmachten
perlmacos
perlmacosx
perlmint
perlmod
perlmodinstall
perlmodlib
perlmodstyle
perlmpeix
perlnetware
perlnewmod
perlnumber
perlobj
perlop
perlopenbsd
perlopentut
perlos2
perlos390
perlos400
perlothrtut
perlpacktut
perlplan9
perlpod
perlpodspec
perlport
perlqnx
perlre
perlref
perlreftut
perlrequick
perlreref
perlretut
perlrun
perlsec
perlsolaris
perlstyle
perlsub
perlsyn
perlthrtut
perltie
perltoc
perltodo
perltooc
perltoot
perltrap
perltru64
perltw
perlunicode
perluniintro
perlutil
perluts
perlvar
perlvmesa
perlvms
perlvos
perlwin32
perlxs
perlxstut
perror
pfbtops
pftp
pgrep
phones
photo
pic
pickup
piconv
pid
pipe
pkcs7
pkcs8
pkcs12
pkg_add
pkg_check
pkg_create
pkg_delete
pkg_info
pkg_sign
pkg_version
pkill
pl2pm
place
pod2html
pod2latex
pod2man
pod2text
pod2usage
podchecker
podselect
poll
popd
popup
posix_madvise
postalias
postcat
postconf
postdrop
postfix
postkick
postlock
postlog
postmap
postqueue
postsuper
pr
pread
preadv
printcap
printenv
printf
proc
procfs
profil
protocols
prove
proxymap
ps
psed
psroff
pstruct
ptrace
publickey
pushd
puts
pwd
pwrite
pwritev
qmgr
qmqpd
quota
quotactl
radiobutton
raise
rand
ranlib
rcp
rcs
rcsclean
rcsdiff
rcsfile
rcsfreeze
rcsintro
rcsmerge
read
readelf
readlink
readonly
readv
realpath
reboot
recv
recvfrom
recvmsg
red
ree
refer
regexp
registry
regsub
rehash
remote
rename
repeat
replace
req
reset
resolver
resource
return
rev
revoke
rfcomm_sppd
rfork
rhosts
ripemd
ripemd160
rlog
rlogin
rm
rmd160
rmdir
rpc
rpcgen
rs
rsa
rsautl
rsh
rtld
rtprio
rup
ruptime
rusers
rwall
rwho
s2p
safe
sasl
sasldblistusers2
saslpasswd2
sbrk
scache
scale
scan
sched
sched_getparam
sched_getscheduler
sched_get_priority_max
sched_get_priority_min
sched_rr_get_interval
sched_setparam
sched_setscheduler
sched_yield
scon
scp
script
scrollbar
sdiff
sed
seek
select
selection
semctl
semget
semop
send
sendbug
sendfile
sendmail
sendmsg
sendto
services
sess_id
set
setegid
setenv
seteuid
setfacl
setgid
setgroups
setitimer
setlogin
setpgid
setpgrp
setpriority
setregid
setresgid
setresuid
setreuid
setrlimit
setsid
setsockopt
settc
settimeofday
setty
setuid
setvar
sftp
sh
sha
sha1
sha256
shar
shells
shift
shmat
shmctl
shmdt
shmget
showq
shutdown
sigaction
sigaltstack
sigblock
sigmask
sigpause
sigpending
sigprocmask
sigreturn
sigsetmask
sigstack
sigsuspend
sigvec
sigwait
size
slapadd
slapcat
slapd
slapdn
slapindex
slappasswd
slaptest
sleep
slogin
slurpd
smbutil
smime
smtp
smtpd
socket
socketpair
sockstat
soelim
sort
source
spawn
speed
spinbox
spkac
splain
split
squid
squid_ldap_auth
squid_ldap_group
squid_unix_group
sscop
ssh
sshd_config
ssh_config
stab
startslip
stat
statfs
stop
string
strings
strip
stty
su
subst
sum
suspend
swapoff
swapon
switch
symlink
sync
sysarch
syscall
sysconftool
sysconftoolcheck
systat
s_client
s_server
s_time
tabs
tail
talk
tar
tbl
tclsh
tcltest
tclvars
tcopy
tcpdump
tcpslice
tcsh
tee
tell
telltc
telnet
term
termcap
terminfo
test
texindex
texinfo
text
textdomain
tfmtodit
tftp
then
threads
time
tip
tk
tkerror
tkvars
tkwait
tlsmgr
tmac
top
toplevel
touch
tput
tr
trace
trafshow
trap
troff
true
truncate
truss
tset
tsort
tty
ttys
type
tzfile
ui
ul
ulimit
umask
unalias
uname
uncomplete
uncompress
undelete
unexpand
unhash
unifdef
unifdefall
uniq
units
unknown
unlimit
unlink
unmount
unset
unsetenv
until
unvis
update
uplevel
uptime
upvar
usbhidaction
usbhidctl
users
utf8
utimes
utmp
utrace
uudecode
uuencode
uuidgen
vacation
variable
verify
version
vfork
vgrind
vgrindefs
vi
vidcontrol
vidfont
view
virtual
vis
vt220keys
vwait
w
wait
wait3
wait4
waitpid
wall
wc
wget
what
whatis
where
whereis
which
while
who
whoami
whois
window
winfo
wish
wm
write
writev
wtmp
x509
xargs
xgettext
xmlwf
xstr
xsubpp
yacc
yes
ypcat
ypchfn
ypchpass
ypchsh
ypmatch
yppasswd
ypwhich
yyfix
zcat
zcmp
zdiff
zegrep
zfgrep
zforce
zgrep
zmore
znew
_exit
__syscall
 
FreeBSD/Linux/UNIX General Commands Manual
Hypertext Man Pages
date
 
DATE(1) 		FreeBSD General Commands Manual 	       DATE(1)

NAME
     date -- display or set date and time

SYNOPSIS
     date [-ju] [-r seconds] [-v [+|-]val[ymwdHMS]] ... [+output_fmt]
     date [-jnu] [[[[[cc]yy]mm]dd]HH]MM[.ss]
     date [-jnu] -f input_fmt new_date [+output_fmt]
     date [-d dst] [-t minutes_west]

DESCRIPTION
     When invoked without arguments, the date utility displays the current
     date and time.  Otherwise, depending on the options specified, date will
     set the date and time or print it in a user-defined way.

     The date utility displays the date and time read from the kernel clock.
     When used to set the date and time, both the kernel clock and the hard-
     ware clock are updated.

     Only the superuser may set the date, and if the system securelevel (see
     securelevel(8)) is greater than 1, the time may not be changed by more
     than 1 second.

     The options are as follows:

     -d dst  Set the kernel's value for daylight saving time.  If dst is non-
	     zero, future calls to gettimeofday(2) will return a non-zero for
	     tz_dsttime.

     -f      Use input_fmt as the format string to parse the new_date provided
	     rather than using the default [[[[[cc]yy]mm]dd]HH]MM[.ss] format.
	     Parsing is done using strptime(3).

     -j      Do not try to set the date.  This allows you to use the -f flag
	     in addition to the + option to convert one date format to
	     another.

     -n      By default, if the timed(8) daemon is running, date sets the time
	     on all of the machines in the local group.  The -n option sup-
	     presses this behavior and causes the time to be set only on the
	     current machine.

     -r seconds
	     Print the date and time represented by seconds, where seconds is
	     the number of seconds since the Epoch (00:00:00 UTC, January 1,
	     1970; see time(3)), and can be specified in decimal, octal, or
	     hex.

     -t minutes_west
	     Set the system's value for minutes west of GMT.  minutes_west
	     specifies the number of minutes returned in tz_minuteswest by
	     future calls to gettimeofday(2).

     -u      Display or set the date in UTC (Coordinated Universal) time.

     -v      Adjust (i.e., take the current date and display the result of the
	     adjustment; not actually set the date) the second, minute, hour,
	     month day, week day, month or year according to val.  If val is
	     preceded with a plus or minus sign, the date is adjusted forwards
	     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.

	     When setting values (rather than adjusting them), seconds are in
	     the range 0-59, minutes are in the range 0-59, hours are in the
	     range 0-23, month days are in the range 1-31, week days are in
	     the range 0-6 (Sun-Sat), months are in the range 1-12 (Jan-Dec)
	     and years are in the range 80-38 or 1980-2038.

	     If val is numeric, one of either y, m, w, d, H, M or S must be
	     used to specify which part of the date is to be adjusted.

	     The week day or month may be specified using a name rather than a
	     number.  If a name is used with the plus (or minus) sign, the
	     date will be put forwards (or backwards) to the next (previous)
	     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.

	     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 honor daylight saving 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 -v +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 -v +3H will be nec-
	     essary to reach October 29, 2:30.

	     When the date is adjusted to a specific value that does not actu-
	     ally exist (for example March 26, 1:30 BST 2000 in the
	     Europe/London timezone), the date will be silently adjusted for-
	     wards in units of one hour until it reaches a valid time.	When
	     the date is adjusted to a specific value that occurs twice (for
	     example October 29, 1:30 2000), the resulting timezone will be
	     set so that the date matches the earlier of the two times.

	     Adjusting the date by months is inherently ambiguous because a
	     month is a unit of variable length depending on the current date.
	     This kind of date adjustment is applied in the most intuitive
	     way.  First of all, date tries to preserve the day of the month.
	     If it is impossible because the target month is shorter than the
	     present one, the last day of the target month will be the result.
	     For example, using -v +1m on May 31 will adjust the date to June
	     30, while using the same option on January 30 will result in the
	     date adjusted to the last day of February.  This approach is also
	     believed to make the most sense for shell scripting.  Neverthe-
	     less, be aware that going forth and back by the same number of
	     months may take you to a different date.

	     Refer to the examples below for further details.

     An operand with a leading plus (`+') sign signals a user-defined format
     string which specifies the format in which to display the date and time.
     The format string may contain any of the conversion specifications
     described in the strftime(3) manual page, as well as any arbitrary text.
     A newline (`\n') character is always output after the characters speci-
     fied by the format string.  The format string for the default display is
     ``+%+''.

     If an operand does not have a leading plus sign, it is interpreted as a
     value for setting the system's notion of the current date and time.  The
     canonical representation for setting the date and time is:

	   cc	   Century (either 19 or 20) prepended to the abbreviated
		   year.
	   yy	   Year in abbreviated form (e.g., 89 for 1989, 06 for 2006).
	   mm	   Numeric month, a number from 1 to 12.
	   dd	   Day, a number from 1 to 31.
	   HH	   Hour, a number from 0 to 23.
	   MM	   Minutes, a number from 0 to 59.
	   ss	   Seconds, a number from 0 to 61 (59 plus a maximum of two
		   leap seconds).

     Everything but the minutes is optional.

     Time changes for Daylight Saving Time, standard time, leap seconds, and
     leap years are handled automatically.

ENVIRONMENT
     The following environment variables affect the execution of date:

     TZ      The timezone to use when displaying dates.  The normal format is
	     a pathname relative to /usr/share/zoneinfo.  For example, the
	     command ``TZ=America/Los_Angeles date'' displays the current time
	     in California.  See environ(7) for more information.

FILES
     /var/log/wtmp	record of date resets and time changes
     /var/log/messages	record of the user setting the time

EXIT STATUS
     The date utility exits 0 on success, 1 if unable to set the date, and 2
     if able to set the local date, but unable to set it globally.

EXAMPLES
     The command:

	   date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"

     will display:

	   DATE: 1987-11-21
	   TIME: 13:36:16

     In the Europe/London timezone, the command:

	   date -v1m -v+1y

     will display:

	   Sun Jan  4 04:15:24 GMT 1998

     where it is currently Mon Aug  4 04:15:24 BST 1997.

     The command:

	   date -v1d -v3m -v0y -v-1d

     will display the last day of February in the year 2000:

	   Tue Feb 29 03:18:00 GMT 2000

     So will do the command:

	   date -v30d -v3m -v0y -v-1m

     because there is no such date as the 30th of February.

     The command:

	   date -v1d -v+1m -v-1d -v-fri

     will display the last Friday of the month:

	   Fri Aug 29 04:31:11 BST 1997

     where it is currently Mon Aug  4 04:31:11 BST 1997.

     The command:

	   date 8506131627

     sets the date to ``June 13, 1985, 4:27 PM''.

	   date "+%Y%m%d%H%M.%S"

     may be used on one machine to print out the date suitable for setting on
     another.  ("+%m%d%H%M%Y.%S" for use on Linux.)

     The command:

	   date 1432

     sets the time to 2:32 PM, without modifying the date.

     Finally the command:

	   date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s"

     can be used to parse the output from date and express it in Epoch time.

DIAGNOSTICS
     Occasionally, when timed(8) synchronizes the time on many hosts, the set-
     ting of a new time value may require more than a few seconds.  On these
     occasions, date prints: `Network time being set'.	The message
     `Communication error with timed' occurs when the communication between
     date and timed(8) fails.

SEE ALSO
     gettimeofday(2), strftime(3), strptime(3), utmp(5), timed(8)

     R. Gusella and S. Zatti, TSP: The Time Synchronization Protocol for UNIX
     4.3BSD.

STANDARDS
     The date utility is expected to be compatible with IEEE Std 1003.2
     (``POSIX.2'').

HISTORY
     A date command appeared in Version 1 AT&T UNIX.

FreeBSD 6.1			August 9, 2004			   FreeBSD 6.1
=19368
+686
(87)