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

[Miniflare 3] Use UTC timezone when building current compatibility date #558

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

mrbbot
Copy link
Contributor

@mrbbot mrbbot commented Apr 17, 2023

When a user specifies a compatibility date, Miniflare compares it against the current date to make sure it's not in the future. Previously, we used the system timezone when getting the current date. Wrangler's default compatibility date is the current date in the UTC timezone. This meant Miniflare occasionally thought Wrangler's compatibility date was in the future. This change updates Miniflare to always use UTC when getting the current date.

Closes cloudflare/workers-sdk#2881

@mrbbot mrbbot added the tre Relating to Miniflare 3 label Apr 17, 2023
@mrbbot mrbbot requested a review from a team April 17, 2023 10:47
@changeset-bot
Copy link

changeset-bot bot commented Apr 17, 2023

⚠️ No Changeset found

Latest commit: 3ec85b3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mrbbot mrbbot changed the title [Miniflare] Use UTC timezone when building current compatibility date [Miniflare 3] Use UTC timezone when building current compatibility date Apr 17, 2023
@mrbbot
Copy link
Contributor Author

mrbbot commented Apr 17, 2023

The CI failure is the same as #551, and should be fixed once that's merged.

When a user specifies a compatibility date, Miniflare compares it
against the current date to make sure it's not in the future.
Previously, we used the system timezone when getting the current
date. Wrangler's default compatibility date is the current date in
the _UTC_ timezone. This meant Miniflare occasionally thought
Wrangler's compatibility date was in the future. This change updates
Miniflare to always use UTC when getting the current date.

Closes cloudflare/workers-sdk#2881
@mrbbot mrbbot force-pushed the tre-utc-compat-date branch from 4a40d00 to 3ec85b3 Compare April 17, 2023 13:25
@mrbbot mrbbot merged commit f0f1634 into tre Apr 17, 2023
@mrbbot mrbbot deleted the tre-utc-compat-date branch April 17, 2023 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tre Relating to Miniflare 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants