-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Date package: Fix timezone issues #27519
Conversation
Size Change: +525 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
👋 @david-szabo97 I think that @vcanales is working on a fix in #27398, ICMYI 😊 |
Hi, thanks for taking on this. I believe our approaches to fix the assumptions that were made before are similar. We also tackled some of the issues of usage I was facing regarding the scheduled post selector. I'm not sure how to proceed though; tests are mostly passing on #27398, and there’s a few eyes on it already. Let me know what you think! |
@vcanales I'm happy to review and help to debug yours! Thank you for your work! I'm a bit unhappy with the current public API of the |
I think this makes sense, although removing those functions would also make it a breaking change; I even found that I broke some things while trying to not alter the API (which is also kind of why the current implementation is not the cleanest). The current API is used by some plugin makers for instance, so a transition period might be necessary. I do agree that publishing time zone utilities would be preferable, and would also be more in tune of the functional approach of Perhaps we could consider making 2 steps out of this: getting the current breakage out of the way, and then rethink |
There shouldn't be such thing like a transition period in terms of API exposed in the WordPress Core. The expectation is to keep old method signatures even when deprecated forever. |
We can keep the old functions and deprecate them. Meanwhile, we can introduce new functions and use them in Gutenberg. This can be done in one or two steps. |
Per convo with @david-szabo97, we'll focus on getting #27398 ready for now in order to avoid removing functions. |
Fixes #27500 #27251
Description
Removed
getDate
andisInTheFuture
in favor ofisSiteDateInTheFuture
,parseSiteData
,siteDateToLocalDate
andlocalDateToSiteDate
. These functions are supposed to be more descriptive to avoid confusion and bugs.How has this been tested?
You can follow testing steps in the two mentioned issues: #27500 #27251
Types of changes
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist: