Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

[Backport 5.0] [fix] makeDateTrunc calculating rolling_month wrong (#52579)#52607

Merged
keegancsmith merged 1 commit into
5.0from
backport-52579-to-5.0
May 31, 2023
Merged

[Backport 5.0] [fix] makeDateTrunc calculating rolling_month wrong (#52579)#52607
keegancsmith merged 1 commit into
5.0from
backport-52579-to-5.0

Conversation

@kopancek

@kopancek kopancek commented May 30, 2023

Copy link
Copy Markdown
Contributor

Backport of #52579

(cherry picked from commit 6d2a71e)

Test plan

tested in upstream main PR: #52579

@cla-bot cla-bot Bot added the cla-signed label May 30, 2023
@kopancek kopancek changed the title [fix] makeDateTrunc calculating rolling_month wrong (#52579) [Backport 5.0] [fix] makeDateTrunc calculating rolling_month wrong (#52579) May 30, 2023
Also fixed the function returning a string without a timezone, when it
always returns times in UTC. This is done by explicitly casting to
timestamptz by using `TIMEZONE('UTC', ...)` function.

Added unit tests as well, to make sure everything works as expected.

Unit tests

(cherry picked from commit 6d2a71e)
@kopancek kopancek force-pushed the backport-52579-to-5.0 branch from 7fe1d82 to 2128acd Compare May 31, 2023 08:34
@keegancsmith keegancsmith merged commit 636872c into 5.0 May 31, 2023
@keegancsmith keegancsmith deleted the backport-52579-to-5.0 branch May 31, 2023 09:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants