Linux/Windows双系统时间同步
Windows和Linux分别用的是RTC和UTC而导致产生8小时的时间差
方案1:linux改为RTC时间(systemd 默认硬件时钟为协调世界时(UTC))
sudo timedatectl set-local-rtc 1
or
sudo timedatectl set-local-rtc true
方案2:
更好的方法是在 Windows 那边改注册表,让 Windows 认 UTC。似乎只有 Windows 会默认认为硬件时间是本地时间
# 以管理员身份使用运行
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f
# 以上方法无效或64位系统:
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_QWORD /f
可以把如下内容保存为*.reg:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
其他:
linux系统时间网络同步:
sudo timedatectl set-ntp true
ref:
https://www.jianshu.com/p/42e6a8289d4d
https://developer.aliyun.com/article/522278
https://codeantenna.com/a/AObiCizXEo
https://wiki.archlinux.org/title/System_time
相关文章
- Linux下TTY驱动程序分析
- linux将home目录的空间转移给根目录
- Linux如何下解压windows下的.zip和.rar文件
- 每天一个linux命令(23):Linux 目录结构
- [linux]Linux下的log
- VM虚拟机 Windows虚拟机中linux鼠标不能动怎么办
- windows和linux中检查端口是否被占用
- 如何从windows中拷贝文件到linux (ubuntu)??
- Linux基础之windows linux双系统
- Linux进程管理之结束与进程名称相匹配的进程(sh脚本)
- linux ubuntu/deepin与Windows时间不同步解决办法(双系统)
- 漏洞修复--Linux 权限提升漏洞(CVE-2022-2588)
- Linux和Windows下获得当前时间并格式化
- [转]Linux的SOCKET编程详解
- windows下编写shell在Linux运行时格式问题 r 错误
- Windows和linux双系统——改动默认启动顺序
- Windows和linux下分别区分mysql大小写的问题以及解决java.sql.SQLSyntaxErrorException: Table ‘xxx‘ doesn‘t exist的错误
- 实现一个跨平台的mysock库(windows、linux)
- Lua 环境结构 --Linux
- L59.linux命令每日一练 -- 第九章 Linux进程管理命令 -- killall和pkill
- L40.linux命令每日一练 -- 第七章 Linux用户管理及用户信息查询命令 -- useradd和usermod
- Linux系统shell脚本之过滤文本关键字
- Linux系统之dd命令详解
- C/C++、Qt开发,跨平台CMake判断当前平台是Linux还是Windows,操作系统判断
- hisat2 建立索引 序列比对rnaseq上游分析linux
- Linux 与 Windows【管道符】查看指定进程
- 【Mysql异构实时同步Oracle】OGG12异构同步mysql到oracle(windows mysql实时同步数据到linux oracle)详细文档