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

Documentation for OS.get_time_zone_info() does not tell if the bias is in seconds or minutes, etc. #5062

Closed
atirut-w opened this issue Jul 3, 2021 · 3 comments
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement

Comments

@atirut-w
Copy link

atirut-w commented Jul 3, 2021

Your Godot version:
3.3.2

Issue description:
I was working on a Godot API to communicate with Game Jolt's Game API and had to convert UNIX time stamp to local time. Not knowing what unit the bias is in gave me a trouble.

URL to the documentation page:
https://docs.godotengine.org/en/stable/classes/class_os.html#class-os-method-get-time-zone-info

@atirut-w atirut-w added the bug label Jul 3, 2021
@z1dev
Copy link

z1dev commented Jul 3, 2021

The documentation doesn't say anything at all regarding the information this function might return. I would like it if it was improved too.

@Calinou Calinou added enhancement and removed bug labels Jul 3, 2021
@Calinou
Copy link
Member

Calinou commented Jul 3, 2021

I was working on a Godot API to communicate with Game Jolt's Game API and had to convert UNIX time stamp to local time. Not knowing what unit the bias is in gave me a trouble.

What was the unit of the bias in the end (since I assume you had to figure it out yourself)?

Edit: According to the source code, the bias is defined in minutes: https://github.com/godotengine/godot/blob/a525e7774006a7439779c7b1bd64ed0f2ccf6385/drivers/unix/os_unix.cpp#L213-L227

@skyace65
Copy link
Contributor

This was fixed in godotengine/godot#54056 and godotengine/godot#49123. This issue can be closed.

@Calinou Calinou closed this as completed Dec 29, 2021
@Calinou Calinou added the area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository label Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement
Projects
None yet
Development

No branches or pull requests

4 participants