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实例化Solar有bug #42

Open
juminut opened this issue May 31, 2024 · 3 comments
Open

通过date实例化Solar有bug #42

juminut opened this issue May 31, 2024 · 3 comments

Comments

@juminut
Copy link

juminut commented May 31, 2024

Date date=Date.valueOf("1991-08-01");

Solar solar=Solar.fromDate(date);

System.out.println(date);

System.out.println(solar);

输出结果:
1991-08-01
1991-07-31

@6tail
Copy link
Owner

6tail commented Jun 3, 2024

使用Date请注意时区。

@juminut
Copy link
Author

juminut commented Jun 8, 2024

应该不是时区问题。91年之后就没问题。91年之前就差一天。

@6tail
Copy link
Owner

6tail commented Jun 8, 2024

你知道夏令时吗?

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

No branches or pull requests

2 participants