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

Incorrect date format pattern in DateGen #2958

Open
Marcono1234 opened this issue Oct 26, 2024 · 2 comments
Open

Incorrect date format pattern in DateGen #2958

Marcono1234 opened this issue Oct 26, 2024 · 2 comments
Labels

Comments

@Marcono1234
Copy link

Describe the bug

  • m is 'minute in hour'; should probably be M
  • D is 'day in year'; should probably be d

To Reproduce

Date date = Date.from(Instant.parse("2024-10-26T22:00:00Z"));
// Bug: Prints "2024-00-301"
new SimpleDateFormat("yyyy-mm-DD").format(date);

Drill version
master (138563a)

@pjfanning
Copy link
Contributor

pjfanning commented Oct 26, 2024

yyyy-MM-dd seems more correct alright - do you want to do a PR?

@Marcono1234
Copy link
Author

Marcono1234 commented Oct 26, 2024

I am not sure if that could break something, in case parts of this project rely on this incorrect format. Or if DateGen is even used at all.

If possible, could you or some of the other maintainers please fix it instead?

(It is not urgent for me though; I am not using the DateGen class, but just stumbled upon this issue in its source code.)

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

No branches or pull requests

2 participants