makarandhinge opened a new pull request, #1609:
URL: https://github.com/apache/commons-lang/pull/1609

   Fixes LANG-771.
   
   ### What
   Fixes an issue where DateUtils.ceiling() incorrectly increments a field when
   the input date is already aligned to the specified field boundary.
   
   ### Why
   Previously, calling ceiling() on a date at the boundary would advance the 
field
   even if no truncation was needed. This caused subtle errors, especially 
around
   DST boundaries.
   
   ### How
   - Modified DateUtils.ceiling() to only increment the field if truncation 
actually
     modified the value.
   - Added a regression test covering DST boundary cases to prevent future 
regressions.
   
   ### Build & Tests
   - Verified build success with `mvn`.
   - All unit tests pass, including the new regression test.
   
   ## Checklist
   - [x] Read the [contribution guidelines](CONTRIBUTING.md)  
   - [ ] Read ASF Generative Tooling Guidance (if using AI)  
   - [ ] I did **not** use AI for this PR  
   - [x] Run a successful build with `mvn`  
   - [x] Write unit tests for behavioral changes (DST regression test)  
   - [x] Detailed PR description included  
   - [x] Each commit has a meaningful subject line


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to