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

Consider moving time methods and enums out of OS #37800

Closed
aaronfranke opened this issue Apr 11, 2020 · 1 comment · Fixed by #49123
Closed

Consider moving time methods and enums out of OS #37800

aaronfranke opened this issue Apr 11, 2020 · 1 comment · Fixed by #49123

Comments

@aaronfranke
Copy link
Member

Issue description: https://docs.godotengine.org/en/latest/classes/class_os.html

The Weekday enum, the Month enum, and methods using them, such as get_date* and get_unix_time_from_datetime, aren't really related to operating systems, so it would make sense if they were moved elsewhere. Perhaps there should be a dedicated class for working with time?

4.0 milestone since this would break compat and therefore we should decide on it before 4.0 is out.

@Anutrix
Copy link
Contributor

Anutrix commented Apr 12, 2020

When doing so, I recommend replacing gmtime and localtime with thread-safe versions. gmtime_r for Unix and gmtime_s for Windows.

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

Successfully merging a pull request may close this issue.

3 participants