报错Error response from daemon: Get “https://registry-1.docker.io/v2/”: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2023-12-02T22:44:18+08:00 is before 2024-04-04T00:00:00Z
centos系统时间和本地(自己电脑)时间不一致
解决办法
1.查看系统时间与硬件时间
#查看系统时间
date
#查看硬件时间
hwclock
删除本地时间
rm -rf /etc/localtime
创建软连接
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
时间同步
yum -y install ntp ntpdate
ntpdate ntp1.aliyun.com
校准硬件时间和软件时间一致
/sbin/hwclock --systohc
检查时间
date
hwclock
原文链接:https://blog.csdn.net/a1764739438/article/details/132719666