Skip to content

[dashboard] Fix display of billing period boundaries by using only UTC times #14088

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

Merged
merged 2 commits into from
Oct 24, 2022

Conversation

jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Oct 21, 2022

Description

Fix display of billing period boundaries in the dashboard by using only UTC times.

(Note: I did try to use dayjs for this, but couldn't figure out how to "force" everything to be UTC, so I fell back on the native Date type. Happy to switch to dayjs if you know how to achieve exactly the same result. 👍)

Related Issue(s)

Fixes #

How to test

  1. Upgrade to usage-based billing
  2. Billing period boundaries shown in your billing UI should be correct

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-payment
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-jx-fix-billing-period-ui.1 because the annotations in the pull request description changed
(with .werft/ from main)

@jankeromnes jankeromnes force-pushed the jx/fix-billing-period-ui branch from 9840410 to 11a3161 Compare October 21, 2022 15:04
@jankeromnes jankeromnes marked this pull request as ready for review October 21, 2022 15:05
@jankeromnes jankeromnes requested a review from a team October 21, 2022 15:05
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Oct 21, 2022
@easyCZ
Copy link
Member

easyCZ commented Oct 21, 2022

To use dayjs, we can use https://day.js.org/docs/en/manipulate/utc
It would look like this: https://github.com/gitpod-io/gitpod/pull/14100/files

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Oct 24, 2022

Many thanks @easyCZ for taking the time to propose a dayjs alternative PR! 🙏

I'll take a look at your proposed changes, and pull them in if I see no issue with them. 👍

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-jx-fix-billing-period-ui.4 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-jx-fix-billing-period-ui.5 because the annotations in the pull request description changed
(with .werft/ from main)

Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

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

LGTM 😉

@roboquat roboquat merged commit 6722bd1 into main Oct 24, 2022
@roboquat roboquat deleted the jx/fix-billing-period-ui branch October 24, 2022 14:30
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants