系统查看时间用 date
更改时间用 date ‘22:39:30 2012-06-12' (root) 即将时间改为2012年6月12日 22点39分30秒
程序实现date命令
#include <stdio.h>
#include <time.h>
int main()
{
time_t tim;
time(&tim);
printf("%s",ctime(&tim));
return 0;
}
开发板上设置系统时间
date 061223052012.30 月日时分年.秒
查看硬件时间 hwclock --show
硬件时间同步 hwclock --systohc
重启后时间错乱. 此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/66586.html
更改时间用 date ‘22:39:30 2012-06-12' (root) 即将时间改为2012年6月12日 22点39分30秒
程序实现date命令
#include <stdio.h>
#include <time.h>
int main()
{
time_t tim;
time(&tim);
printf("%s",ctime(&tim));
return 0;
}
开发板上设置系统时间
date 061223052012.30 月日时分年.秒
查看硬件时间 hwclock --show
硬件时间同步 hwclock --systohc
重启后时间错乱. 此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/66586.html