Skip to content

Update examples for FROM_UNIXTIME_NANOS#10442

Merged
ebyhr merged 2 commits intotrinodb:masterfrom
OneRaynyDay:master
Jan 1, 2022
Merged

Update examples for FROM_UNIXTIME_NANOS#10442
ebyhr merged 2 commits intotrinodb:masterfrom
OneRaynyDay:master

Conversation

@OneRaynyDay
Copy link
Copy Markdown
Member

The documentation originally stated that FROM_UNIXTIME_NANOS would yield a timestamp(9) with time zone, but the example output is not timezoned.

Copy link
Copy Markdown
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

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

Let's use UTC as timezone so that we can understand the function's behavior quickly.

1970-01-01 00:00:00.000000100 UTC
1970-01-01 00:00:00.000001234 UTC
1970-01-01 00:00:00.000001234 UTC
1969-12-31 23:59:59.999998766 UTC

@ebyhr ebyhr added the docs label Jan 1, 2022
@OneRaynyDay
Copy link
Copy Markdown
Member Author

@ebyhr There are a couple more instances of timezone examples where they use a different timezone, should we modify those as well?

For example, see FROM_ISO8601_TIMESTAMP documentation:

SELECT from_iso8601_timestamp('2020-05-11');
-- 2020-05-11 00:00:00.000 America/Vancouver

Should be changed to UTC as well?

@ebyhr
Copy link
Copy Markdown
Member

ebyhr commented Jan 1, 2022

I think there is no need to change FROM_ISO8601_TIMESTAMP because the timezone doesn't affect the timestamp output.

@ebyhr ebyhr merged commit aa15d81 into trinodb:master Jan 1, 2022
@github-actions github-actions bot added this to the 368 milestone Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants