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

Date as Long #188

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

Date as Long #188

wants to merge 3 commits into from

Conversation

pnemonic78
Copy link
Contributor

java.util.Date has been deprecated for many years.

@KosherJava
Copy link
Owner

@pnemonic78 , the Date class was not deprecated. Many of its methods were, but not the Date class itself. It is more readable than using a long that would have to be described as a long starting at Jan 1, 1970 GMT :)

@pnemonic78
Copy link
Contributor Author

most Java developers already know that long time means milliseconds since 1970/1/1

@KosherJava
Copy link
Owner

most Java developers already know that long time means milliseconds since 1970/1/1

It still has almost no performance gain and has a small loss in clarity to developers. It would also break backwards comparability rather seriously. I am inclined to not accept this PR.

@jgindin
Copy link
Contributor

jgindin commented Jun 22, 2022 via email

@KosherJava
Copy link
Owner

KosherJava commented Aug 24, 2023

@pnemonic78 and @jgindin ,
I am not sure that there would be value, but at some point (maybe v3.0.0) we may change Dates to the more modern java.time.Instant or a java.time.ZonedDateTime. ZonedDateTime would have an issue when dealing with times in the non "native" TimeZones, such as calculating UTC time globally (I know of concrete use cases for this). java.time.LocalDateTime and java.time.LocalTime are likely too ambiguous for us to use in this project.

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

3 participants