Aix 修改日期时间

昨天一同事随口问我,AIX下如何修改时间?
第一反应就是让我想起了原来在LINUX下做ORACLE RAC时,由于更改时间导致数据库的问题,所以就说:"有点麻烦,要注意。"
实际上如果没有数据库RAC,修改是很简单的,一是使用SMIT类图形化界面smit date;二是使用date命令直接修改,在实际项目中,很少有更改系统时间的情况,因为安装操作系统后,重要的一项就是核对设置系统时间,如果安装操作系统不设置正确的时间和时区,那就有点应付了。也有小机在运行过程中,时钟不正确的案例,遇到过HP的机器有这情况,原因连HP的支持也说不清楚。
js21-1 /#>date
Wed Sep 24 11:06:04 CDT 2008
js21-1 /#>date 09241115
Wed Sep 24 11:15:02 CDT 2008

MAN中的解释如下:

[@more@]

Syntax

To Set the Date and Time as Root User
/usr/bin/date [ -n ] [ -u ] [ Date ] [ +FieldDescriptor ... ]
The following formats can be used when setting the date with the Date
parameter:
* mmddHHMM[YYyy]
* mmddHHMM[yy]

The variables to the Date parameter are defined as follows:
mm
Specifies the month number.
dd
Specifies the number of the day in the month.
HH
Specifies the hour in the day (using a 24-hour clock).
MM
Specifies the minute number.
YY
Specifies the first two digits of the year. Note: If you do not
specify the first two digits of the year, values in the range 69
to 99 refer to the twentieth century, 1969 to 1999 inclusive, and
values in the range 00 to 68 refer to years in the twenty-first
century, 2000 to 2068 inclusive.
yy
Specifies the last two digits of the year. Note: The date command
accepts a 4 digit year as input. For example, if a four-digit year
is specified, the date command tries to set the year to "YYyy" and
fails for values which are out of range (less than 1970 and
greater than 2037).

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/271063/viewspace-1010972/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/271063/viewspace-1010972/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值