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

DateTime sun calculation is always done in UTC #321

Open
MathiasBaumgartinger opened this issue Jul 6, 2023 · 3 comments
Open

DateTime sun calculation is always done in UTC #321

MathiasBaumgartinger opened this issue Jul 6, 2023 · 3 comments
Labels
wontfix This will not be worked on

Comments

@MathiasBaumgartinger
Copy link
Contributor

The calculations done in World/Environment/SunPosition.gd:get_solar_angles_for_datetime seem off (or are not properly applied).

E.g.: Sunset is at ~18:30 on June 21st which cannot be true
image

@kb173
Copy link
Member

kb173 commented Jul 6, 2023

It's UTC, you need to add 2 hours for CEST

@kb173
Copy link
Member

kb173 commented Aug 2, 2023

Not sure how we can improve this without a large amount of overhead. there is Time.get_time_zone_from_system(), but that would not account for summer/winter time based on the configured time of day. We could add a manual check for that specifically for CET/CEST, but we may be in a different geographic area than the system. For a proper solution, we'd need to add a library like https://github.com/BertoldVdb/ZoneDetect to Geodot or a new separate GDExtension. Otherwise, maybe we can just add a small note to the UI?

@kb173 kb173 added the wontfix This will not be worked on label Aug 2, 2023
@kb173 kb173 changed the title Sunposition calculation for DateTime is invalid DateTime sun calculation is always done in UTC Dec 19, 2023
@kb173
Copy link
Member

kb173 commented Dec 20, 2023

We could add time zone config into the .ll config in form of the UTC+? hours, something like this:

"Metadata": {
    "TimeZone": 2,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants