You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Sammi Chen (Jira)" <ji...@apache.org> on 2025/10/28 11:45:00 UTC
[jira] [Assigned] (HDDS-13781) Certificate expiry date should consider time zone daylight saving impact
[ https://issues.apache.org/jira/browse/HDDS-13781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sammi Chen reassigned HDDS-13781:
---------------------------------
Assignee: Sammi Chen
> 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
> Assignee: Sammi Chen
> Priority: Major
>
> 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 CN=scm@quasar-gpbqby-8.vpc.cloudera.com,OU=ccb54a4d-280c-475e-b7e0-78a2707f62e1,O=CID-bdfb77b9-5929-43c1-9ad7-afeae89c653a,SERIALNUMBER=1 CN=scm@quasar-gpbqby-8.vpc.cloudera.com,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({color:#1d1c1d} {color}[https://github.com/apache/ozone/blob/master/hadoop-hdds/framework/src/main/java/or[…]p/hdds/security/x509/certificate/authority/DefaultCAServer.java|https://github.com/apache/ozone/blob/master/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 endDate 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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org