triggerdotdev / trigger.dev

Trigger.dev is the open source background jobs platform.
https://trigger.dev/changelog
Apache License 2.0
9.43k stars 591 forks source link

bug: webapp billing period description #1445

Open ubinatus opened 3 weeks ago

ubinatus commented 3 weeks ago

Describe the bug

Minor bug on the billing period message that displays an invalid period range:

image

Should be from Oct1 to Oct 31 (or Nov 1) but not Nov 30. Might be because today is the last day of the month?

Current locale: GMT-5

https://github.com/triggerdotdev/trigger.dev/blob/da08e5015f297d21619aa45190fafd0b0ca460dd/apps/webapp/app/routes/_app.orgs.%24organizationSlug.v3.billing/route.tsx#L44-L56

matt-aitken commented 2 weeks ago

Yes I'm sure you're correct on why this is happening. The UTC dates are correct but then we display using our <DateTime> React component which renders in your local browser timezone by default…

matt-aitken commented 2 weeks ago

Actually ignore my last comment. That wouldn't explain why it's coming back as November 30… 😕 This is strange because the code you've included runs on our server which is UTC.

The way to fix this is with the debugger on and setting your timezone