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

Fix wrong timeRange for cloudscale.ch bucket metrics #77

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

TheBigLee
Copy link
Member

@TheBigLee TheBigLee commented Jan 23, 2024

cloudscale.ch counts the day from midnight to midnight in the Europe/Zurich timezone (see: https://github.com/cloudscale-ch/cloudscale-go-sdk/blob/v2.1.0/metrics.go#L15-L19) However, we for us in odoo the day is from
midnight to midnight in UTC.
We therefore can't use the Start and End times provided in the resulting metric, but instead set it ourselves, to the correct midnight time of UTC for the desired day.

Checklist

  • The PR has a meaningful title. It will be used to auto generate the
    changelog.
    The PR has a meaningful description that sums up the change. It will be
    linked in the changelog.
  • PR contains a single logical change (to build a better changelog).
  • Update the documentation.
  • Categorize the PR by adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog.
  • Link this PR to related issues or PRs.

cloudscale.ch counts the day from midnight to midnight in the
Europe/Zurich timezone (see: https://github.com/cloudscale-ch/cloudscale-go-sdk/blob/v2.1.0/metrics.go#L15-L19)
However, we for us in odoo the day is from
midnight to midnight in UTC.
We therefore can't use the Start and End times provided in the resulting
metric, but instead set it ourselves, to the correct midnight time of
UTC for the desired day.

Signed-off-by: Nicolas Bigler <nicolas.bigler@vshn.ch>
@TheBigLee TheBigLee added the bug Something isn't working label Jan 23, 2024
Copy link
Contributor

@Kidswiss Kidswiss left a comment

Choose a reason for hiding this comment

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

Only listened to the discussion with half an ear, but LGTM

@TheBigLee TheBigLee merged commit a60c06b into master Jan 23, 2024
3 checks passed
@TheBigLee TheBigLee deleted the fix/cloudscale_timerange branch January 23, 2024 15:22
@TheBigLee TheBigLee restored the fix/cloudscale_timerange branch January 23, 2024 15:23
@TheBigLee TheBigLee deleted the fix/cloudscale_timerange branch January 23, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants