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

Docs: Add some notes about timezones and UTC to Time #54256

Merged
merged 1 commit into from
Oct 26, 2021

Conversation

mhilbrunner
Copy link
Member

Repeats some warnings/notes from the class description in the appropriate methods, also adding some notes about UTC/timezones and bit size/wrapping of values.

Should fix #52951.

@mhilbrunner mhilbrunner added this to the 4.0 milestone Oct 26, 2021
@mhilbrunner mhilbrunner requested a review from a team as a code owner October 26, 2021 07:56
@mhilbrunner mhilbrunner changed the title Time: Add some notes about timezones and UTC Docs: Add some notes about timezones and UTC to Time Oct 26, 2021
doc/classes/Time.xml Outdated Show resolved Hide resolved
doc/classes/Time.xml Outdated Show resolved Hide resolved
@mhilbrunner
Copy link
Member Author

Updated, fixed :)

@akien-mga akien-mga merged commit d020c68 into godotengine:master Oct 26, 2021
@akien-mga
Copy link
Member

Thanks!

@mhilbrunner mhilbrunner deleted the docs-real-time branch October 26, 2021 10:02
</description>
</method>
<method name="get_unix_time_from_datetime_string" qualifiers="const">
<return type="int" />
<argument index="0" name="datetime" type="String" />
<description>
Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both.
[b]Note:[/b] Unix timestamps are usually in UTC, the given datetime string may not be.
Copy link
Member

@aaronfranke aaronfranke Oct 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timestamp will be equivalent to whatever datetime string is given. It doesn't do any conversion. If the string is a time offset from UTC, the timestamp will be too. The docs are not incorrect, but I think this could be phrased better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I'm not against improving the wording if you have a suggestion. :)

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

Successfully merging this pull request may close these issues.

OS.get_datetime_from_unix_time() does not return the same value as OS.get_datetime()
3 participants