Chinaunix

标题: 怎么修改solaris的日期 [打印本页]

作者: solar.xie    时间: 2008-10-24 19:43
标题: 怎么修改solaris的日期

bash-2.03# man date
Reformatting page.  Please Wait... done
User Commands                                             date(1)
NAME
     date - write the date and time
SYNOPSIS
     /usr/bin/date [ -u ]  [  +  format  ]
     /usr/bin/date [  -a  [ - ]  sss.fff  ]
     /usr/bin/date [ -u ]  [  [ mmdd ]  HHMM  |  mmddHHMM  [ cc ]
     yy  ]  [ .SS ]
     /usr/xpg4/bin/date [ -u ]  [  +  format  ]
     /usr/xpg4/bin/date [  -a  [ - ]  sss.fff  ]
     /usr/xpg4/bin/date [ -u ]  [  [ mmdd ]  HHMM  |  mmddHHMM  [
     cc ]  yy  ]  [ .SS ]
DESCRIPTION
     The date utility writes the date and time to standard output
     or attempts to set the system date and time. By default, the
     current date and time will be written.
     Specifications of native language translations of month  and
     weekday  names  are  supported.  The month and weekday names
     used for a language are based on the locale specified by the
     environment variable LC_TIME;  see environ(5).
     The following is the default form for the "C" locale:
          %a %b %e %T %Z %Y
     for example,
     Fri Dec 23 10:10:42 EST 1988
OPTIONS
     The following options are supported:
     -a [-]sss.fff
           Slowly  adjust  the  time  by  sss.fff  seconds   (fff
           represents fractions of a second). This adjustment can
           be positive or negative. The system's  clock  will  be
           sped  up  or  slowed  down until it has drifted by the
           number of seconds specified. Only the  super-user  may
           adjust the time.
     -u    Display (or set)  the  date  in  Greenwich  Mean  Time
           (GMT-universal  time), bypassing the normal conversion
           to (or from) local time.
---------------------------------------------
bash-2.03# date
Fri Jan 25 03:42:55 CST 2008
bash-2.03# date -u 102419422008
Fri Oct 24 19:42:00 GMT 2008
bash-2.03# date
Sat Oct 25 03:42:07 CST 2008
bash-2.03# date
Sat Oct 25 03:42:19 CST 2008
bash-2.03# date
改完,回显是对的,但再查一下,就不对了,时区变了?

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/68079/showart_1334698.html
作者: jover    时间: 2008-10-29 10:29
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2