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 monthand
   weekdaynamesaresupported.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
         Slowlyadjustthetimebysss.fffseconds   (fff
         represents fractions of a second). This adjustment can
         be positive or negative. The system'sclockwillbe
         speduporsloweddown until it has drifted by the
         number of seconds specified. Only thesuper-usermay
         adjust the time.
   -u    Display (or set)thedateinGreenwichMeanTime
         (GMT-universaltime), 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

页: [1]
查看完整版本: 怎么修改solaris的日期