惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
罗磊的独立博客
IT之家
IT之家
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
博客园 - Franky
博客园 - 聂微东
博客园_首页
爱范儿
爱范儿
量子位
博客园 - 三生石上(FineUI控件)
G
Google Developers Blog
Martin Fowler
Martin Fowler
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
Vercel News
Vercel News
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
Engineering at Meta
Engineering at Meta

博客园 - ShaDowiCool

Italy Sends Soldiers to Naples 那不勒斯 to Fight Organized Crime Sarah Palin, Governor of Alaska, Is McCain's Surprise Choice 测试流程-转载 黑盒测试外包的工作初见 个人面试经历总结 Mysql忘记root密码的解决办法 take the bull by the horns blow one's own horn like a house on fire bring down the house or bring the house down burn a hole in one's pocket & burned hook, line and sinker lock, stock and barrel 测试心得(国内软件产品的需求不明确) 黄金的18K和24K是什么意思 freeBSD与linux下mysql命令 测中策---我的Web自动化测试思路 测试经验总结 我的测试心得 Linux误删数据文件的处理方法
freeBSD时区设置与时间设置
ShaDowiCool · 2008-04-22 · via 博客园 - ShaDowiCool

FreeBSD经常在安装的时候一不注意就设置了UTC,结果服务器上的时间和我们中国时区的时间总是差8小时,我们可以用下面的方法来更改时区。

引用

#sysinstall
选择 configure
选择 Time Zone
UTC = no
选择 Asia
选择 China
选择 east China - Beijing,Guangdong,Shanghai etc.
Does the abbreviation `CST' look reasonable? = OK
然后退出sysinstall就可以了。

用date命令验证一下
#date
Mon Feb 5 12:35:01 CST 2007

如果时间不对,就用下面的命令同步windows的时间服务器
ntpdate time.windows.com
这样时间就对了,如果你时钟经常会变慢,你可以在crontab设置定时执行同步时间命令。

显示当前的时间:
date
Fri Oct 22 21:38:29 CST 2004

设置时间:
date 0410222141
时间格式为年、月、日、时、分,每个各占两个数字,其形式即为yymmddhhmm,大部分情况下是对时间进行小调整,可以略去前面的年月日部分,而仅使用四位数字表示时、分,形如hhmm

通过Internet同步时间:
ntpdate nist1.symmetricom.com