暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

系统、数据库时间研究

原创 .ing 2022-12-02
236

1.linux时间

查看当前系统时间

date   


系统运行时间

uptime   


当前系统运行时间2分钟


修改日期时间 2022-12-02或2022/12/02或20221202都可以

date -s "2022-12-02 17:35"       

修改日期

date -s "2022-12-02                  

修改时间

date -s "17:35"                           


查看硬件时间

hwclock -r

 写入BIOS,否则重启后系统时间失效

hwclock -s, --hctosys set the system time from the hardware clock
hwclock -w, --systohc set the hardware clock from the current system time


2.oracle数据库时间

数据库当前时间

select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;


实例启动时间

select INSTANCE_NAME,to_char(STARTUP_TIME,'yyyy-mm-dd hh24:mi:ss') from v$instance;


3.mysql数据库当前时间

select sysdate();

最后修改时间:2022-12-05 10:53:00
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论