Sammi Chen created HDDS-13781:
---------------------------------
Summary: Certificate expiry date should consider time zone
daylight saving impact
Key: HDDS-13781
URL: https://issues.apache.org/jira/browse/HDDS-13781
Project: Apache Ozone
Issue Type: Bug
Reporter: Sammi Chen
This is the “ozone admin cert list” output from one cluster,
{code:java}
[root@quasar-gpbqby-1 systest]# ozone admin cert list
Certificate list:(Type=VALID, BatchSize=20, CertCount=15)
SerialNumber Valid From Expiry
Subject
Issuer
1 Tue Oct 07 05:00:17 PDT 2025 Fri Nov 15 05:00:17 PST 2030
[email protected],OU=ccb54a4d-280c-475e-b7e0-78a2707f62e1,O=CID-bdfb77b9-5929-43c1-9ad7-afeae89c653a,SERIALNUMBER=1
[email protected],OU=ccb54a4d-280c-475e-b7e0-78a2707f62e1,O=CID-bdfb77b9-5929-43c1-9ad7-afeae89c653a,SERIALNUMBER=1
[root@quasar-gpbqby-1 systest]# date
Thu Oct 9 07:48:45 PM PDT 2025 {code}
>From this output, it looks like the hour of two date matches. But if convert
>Date to epoch, there is a 60 min unexpected gap, and this is caused by
>{{LocalDateTime}} doesn’t consider time zone. The current way of specify
>endDate([https://github.infra.cloudera.com/CDH/ozone/blob/cdh_main/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/authority/DefaultCAServer.java#L246])
> works well on time zone which doesn’t have Daylight Saving, but it will cause
>the endDate one hour ahead or after the expected endDate, if the beginDate and
>endDate, one with Daylight Saving, while another without.
a. beginDate PDT, endDate PST
{code:java}
begin = Fri Oct 24 19:46:50 PDT 2025
end = Mon Dec 02 19:46:50 PST 2030
zoneId = America/Los_Angeles, durationEpoch = 161136000000
beginEpoch = 1761360410000, endEpoch = 1922500010000, diff(endEpoch -
beginEpoch) = 161139600000
is diff match duration? false, gap(diff - durationEpoch) = 60 min {code}
b. beginDate PST, endDate PDT
{code:java}
begin = Mon Feb 24 19:46:50 PST 2025
end = Thu Apr 04 19:46:50 PDT 2030
zoneId = America/Los_Angeles, durationEpoch = 161136000000
beginEpoch = 1740455210000, endEpoch = 1901587610000, diff(endEpoch -
beginEpoch) = 161132400000
is diff match duration? false, gap(diff - durationEpoch) = -60 min {code}
c. both beginDate and endData PDT
{code:java}
begin = Sat May 24 19:46:50 PDT 2025
end = Tue Jul 02 19:46:50 PDT 2030
zoneId = America/Los_Angeles, durationEpoch = 161136000000
beginEpoch = 1748141210000, endEpoch = 1909277210000, diff(endEpoch -
beginEpoch) = 161136000000
is diff match duration? true, gap(diff - durationEpoch) = 0 min {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]