On Mon, 26 Oct 2026 21:56:35 GMT, Mikhail Yankelevich 
<[email protected]> wrote:

>> Adding new methods to `X509Certificate` to return `Instant` instead of 
>> `Date` as well as moving away from `Date` in internal packages wherever 
>> possible.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Mikhail Yankelevich has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Weijun's comments

src/java.base/share/classes/sun/security/util/DerOutputStream.java line 510:

> 508:      */
> 509:     public DerOutputStream putTime(Instant d) {
> 510:         return (d.isBefore(utcLow) || d.isAfter(utcHigh)) ? 
> putGeneralizedTime(d) : putUTCInstant(d);

Do we need to truncate `d` to second before checking `isBefore` and `isAfter`?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r4394331409

Reply via email to