Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove joda-time and use Java 8 time instead #67

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chriskilding
Copy link

Remove joda-time library and use Java 8 time instead.

@chriskilding
Copy link
Author

Relevant to #55

@chriskilding
Copy link
Author

This is initially a mechanical line-by-line port from the Joda methods to the relevant Java 8 time methods. Will see what fails and evolve it from there.

@chriskilding
Copy link
Author

chriskilding commented Nov 17, 2020

One fairly regular error stands out at first, when it tries to format a date:

java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: YearOfEra

@chriskilding
Copy link
Author

Fixed, but there is a catch: the java.util.Date instance is converted to a LocalDateTime using the system default ZoneId. This is not usually a safe assumption. This needs to be examined in any future review.

@chriskilding chriskilding marked this pull request as ready for review November 17, 2020 15:51
@chriskilding
Copy link
Author

@damnhandy would you be able to review this?

@chriskilding
Copy link
Author

@damnhandy would you be able to take a look at this?

@damnhandy
Copy link
Owner

Hey @chriskilding, I'll be taking a look at this. I'm making some changes to the CI set up of the project, it's been kind of a mess for years. Once I get through that for version 2.2.0, I'll also be setting the min Java version to Java 8. Right now, the min Java version has been Java 1.7, mainly due to the fact that this library had been used by a few Android devs and the Java Time API had not been available. Now that we're many years out, I think it's safe make Java 8 the minimum Java version.

@jmott
Copy link

jmott commented May 4, 2021

Happy to see traction here, I'm getting some pressure about my use of damnhandy due to the EOL status of joda-time, and I'd rather not have to go looking for another solution. Thanks!

@sratz
Copy link

sratz commented Aug 12, 2021

Bumping this.

We would also like migrate to the latest version of handy-uri-templates, but with joda-time this is not an option.

@jetersen
Copy link

Would really like to see this land 😄 Some of the Jenkins plugin uses this lib and it would be nice to have a library not depend on any libraries.

@sratz
Copy link

sratz commented Nov 21, 2022

Any update here?

@benjsmi
Copy link

benjsmi commented May 7, 2024

+1 to reviewing this. Joda-Time is now vulnerable! https://nvd.nist.gov/vuln/detail/CVE-2024-23080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants