Unix SSL 证书日期比 Windows 多 6 小时

Unix SSL certificates dates are 6 hours more than Windows

当我从完全相同的证书中获取所有数据时,我遇到了问题。日期显示与 Windows 中显示的不同。

在 unix 中,我正在执行此命令

 openssl x509 -noout -in ca.crt -dates
 notBefore=Oct 31 00:00:00 2013 GMT
 notAfter=Oct 30 23:59:59 2023 GMT

我在Windows中打开完全相同的证书,日期显示如下:

notBefore: ‎Wednesday, ‎October ‎30, ‎2013 6:00:00 PM
notAfter: ‎Monday, ‎October ‎30, ‎2023 5:59:59 PM

如您所见,日期不匹配。

我不确定这是否适用于 "GMT" 时区或者可能是什么问题,你知道这是什么问题吗?

哪个日期是正确的? Unix 或 Windows?

两者都正确:

  • opensslUTC 中打印日期(这也是 known/indicated 作为 "GMT")
  • Windows 打印系统时区中的日期(无论 Windows 机器中配置的时区)

我在你的个人资料中看到你来自墨西哥,所以你的 Windows 机器可能配置了 one of the Mexico's timezones: specifically, one that is 6 hours behind UTC right now (a.k.a. Central Time Zone)。