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

[Feature]: Change java.util.Date to java.time.LocalDateTime in Clock API #1686

Open
lubomsky opened this issue Oct 16, 2024 · 1 comment
Open

Comments

@lubomsky
Copy link

🚀 Feature Request

Implementing code using Clock is not as pleasant as it could be.

Example

Now, I have to write something like this:

Instant instant = Instant.now().plus(10, ChronoUnit.MINUTES);
Date date = Date.from(instant);

page.clock().setSystemTime(date)

But I would like to write just like this:

page.clock().setSystemTime(LocalDateTime.now().plusMinutes(10))

Motivation

To use more modern and more convenient java.

First article

Second article

@jhyot
Copy link

jhyot commented Nov 28, 2024

Definitely 100% support for this. Please don't use the very old and broken Date API, modern code should always use the java.time API.

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

No branches or pull requests

3 participants